diff options
author | Giuseppe Di Natale <[email protected]> | 2017-02-28 18:02:48 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-02-28 18:02:48 -0800 |
commit | d25534f875ba302fab8fcce3c21d7ddd9e775fbf (patch) | |
tree | 4d290fb8c198246f404a6ba092423eed201f699f /scripts | |
parent | ec0e24c232cac7afa801ca8d247f212c24eb02a3 (diff) |
Bug fixes for single test runs in zfs-tests
Correctly remove the temporary runfile after the
single test is run.
Cleanup and setup scripts are relative to the
test suite's location, correct how we look for
those scripts.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes #5844
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/zfs-tests.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/zfs-tests.sh b/scripts/zfs-tests.sh index b1be68bd1..f06d6a1ab 100755 --- a/scripts/zfs-tests.sh +++ b/scripts/zfs-tests.sh @@ -154,7 +154,7 @@ find_runfile() { usage() { cat << EOF USAGE: -$0 [hvqxkf] [-s SIZE] [-r RUNFILE] +$0 [hvqxkf] [-s SIZE] [-r RUNFILE] [-t PATH] [-u USER] DESCRIPTION: ZFS Test Suite launch script @@ -169,7 +169,7 @@ OPTIONS: -d DIR Use DIR for files and loopback devices -s SIZE Use vdevs of SIZE (default: 4G) -r RUNFILE Run tests in RUNFILE (default: linux.run) - -t PATH Run single test at PATH + -t PATH Run single test at PATH relative to test suite -u USER Run single test as USER (default: root) EXAMPLES: @@ -264,11 +264,11 @@ EOF SETUPSCRIPT= CLEANUPSCRIPT= - if [ -f "$SINGLETESTDIR/setup.ksh" ]; then + if [ -f "$STF_SUITE/$SINGLETESTDIR/setup.ksh" ]; then SETUPSCRIPT="setup" fi - if [ -f "$SINGLETESTDIR/cleanup.ksh" ]; then + if [ -f "$STF_SUITE/$SINGLETESTDIR/cleanup.ksh" ]; then CLEANUPSCRIPT="cleanup" fi @@ -409,7 +409,7 @@ RESULT=$? echo if [ ${#SINGLETEST[@]} -ne 0 ]; then - rm -f "$RUNFILEDIR/$RUNFILE" &>/dev/null + rm -f "$RUNFILE" &>/dev/null fi exit ${RESULT} |