diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-03-15 12:28:06 +0000 |
---|---|---|
committer | Rich Johnston <rjohnston@sgi.com> | 2013-03-26 21:46:23 -0500 |
commit | e5c7cd83c4840792789dc773ce038d2212db7b0e (patch) | |
tree | fde427fd34bffad4ee15ffb68d6913f08cbb1335 /check | |
parent | 0b1e8abd4a6dbce54bcc5d0467e58966e41e7eb8 (diff) | |
download | xfstests-dev-e5c7cd83c4840792789dc773ce038d2212db7b0e.tar.gz |
xfstests: RESULTS_DIR needs to be an absolute path
Some tests 'cd <somedir>' and then direct output to $RESULT_DIR,
which fails if the current working directory is not $here.
Regardless, if an external results directory is to be used it needs
to have a full path specified and the use of $here as the base of
the results files is completely incorrect.
Hence change all the $here/$seqres* references to simply be
$seqres*, and instead encode the full path to the results in
$RESULT_DIR.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Phil White <pwhite@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Diffstat (limited to 'check')
-rwxr-xr-x | check | 55 |
1 files changed, 22 insertions, 33 deletions
@@ -36,25 +36,38 @@ here=`pwd` FSTYP=xfs xfile="" -SUPPORTED_TESTS="[0-9][0-9][0-9] [0-9][0-9][0-9][0-9]" -SRC_GROUPS="generic shared" -export SRC_DIR="tests" -export RESULT_BASE=${RESULT_BASE:="results"} - -# generic initialization +# start the initialisation work now iam=check +export MSGVERB="text:action" export QA_CHECK_FS=${QA_CHECK_FS:=true} -# by default don't output timestamps -timestamp=${TIMESTAMP:=false} - # number of diff lines from a failed test, 0 for whole output export DIFF_LENGTH=${DIFF_LENGTH:=10} # by default don't output timestamps timestamp=${TIMESTAMP:=false} +rm -f $tmp.list $tmp.tmp $tmp.grep $here/$iam.out $tmp.xlist + +# Autodetect fs type based on what's on $TEST_DEV +if [ "$HOSTOS" == "Linux" ]; then + FSTYP=`blkid -c /dev/null -s TYPE -o value $TEST_DEV` +fi +export FSTYP + +# we need common.config +if ! . ./common/config +then + echo "$iam: failed to source common/config" + exit 1 +fi + +SUPPORTED_TESTS="[0-9][0-9][0-9] [0-9][0-9][0-9][0-9]" +SRC_GROUPS="generic shared" +export SRC_DIR="tests" +export RESULT_BASE=${RESULT_BASE:="$here/results"} + usage() { echo "Usage: $0 [options] [testlist]"' @@ -79,12 +92,6 @@ testlist options exit 0 } -_setenvironment() -{ - MSGVERB="text:action" - export MSGVERB -} - get_group_list() { grp=$1 @@ -147,24 +154,6 @@ _timestamp() echo -n " [$now]" } -# start the initialisation work now -_setenvironment - -rm -f $tmp.list $tmp.tmp $tmp.grep $here/$iam.out $tmp.xlist - -# Autodetect fs type based on what's on $TEST_DEV -if [ "$HOSTOS" == "Linux" ]; then - FSTYP=`blkid -c /dev/null -s TYPE -o value $TEST_DEV` -fi -export FSTYP - -# we need common.config -if ! . ./common/config -then - echo "$iam: failed to source common/config" - exit 1 -fi - # Process command arguments first. while [ $# -gt 0 ]; do case "$1" in |