mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 11:29:36 +03:00
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 <behlendorf1@llnl.gov> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes #5844
This commit is contained in:
parent
ec0e24c232
commit
d25534f875
@ -154,7 +154,7 @@ find_runfile() {
|
|||||||
usage() {
|
usage() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
USAGE:
|
USAGE:
|
||||||
$0 [hvqxkf] [-s SIZE] [-r RUNFILE]
|
$0 [hvqxkf] [-s SIZE] [-r RUNFILE] [-t PATH] [-u USER]
|
||||||
|
|
||||||
DESCRIPTION:
|
DESCRIPTION:
|
||||||
ZFS Test Suite launch script
|
ZFS Test Suite launch script
|
||||||
@ -169,7 +169,7 @@ OPTIONS:
|
|||||||
-d DIR Use DIR for files and loopback devices
|
-d DIR Use DIR for files and loopback devices
|
||||||
-s SIZE Use vdevs of SIZE (default: 4G)
|
-s SIZE Use vdevs of SIZE (default: 4G)
|
||||||
-r RUNFILE Run tests in RUNFILE (default: linux.run)
|
-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)
|
-u USER Run single test as USER (default: root)
|
||||||
|
|
||||||
EXAMPLES:
|
EXAMPLES:
|
||||||
@ -264,11 +264,11 @@ EOF
|
|||||||
SETUPSCRIPT=
|
SETUPSCRIPT=
|
||||||
CLEANUPSCRIPT=
|
CLEANUPSCRIPT=
|
||||||
|
|
||||||
if [ -f "$SINGLETESTDIR/setup.ksh" ]; then
|
if [ -f "$STF_SUITE/$SINGLETESTDIR/setup.ksh" ]; then
|
||||||
SETUPSCRIPT="setup"
|
SETUPSCRIPT="setup"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$SINGLETESTDIR/cleanup.ksh" ]; then
|
if [ -f "$STF_SUITE/$SINGLETESTDIR/cleanup.ksh" ]; then
|
||||||
CLEANUPSCRIPT="cleanup"
|
CLEANUPSCRIPT="cleanup"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -409,7 +409,7 @@ RESULT=$?
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
if [ ${#SINGLETEST[@]} -ne 0 ]; then
|
if [ ${#SINGLETEST[@]} -ne 0 ]; then
|
||||||
rm -f "$RUNFILEDIR/$RUNFILE" &>/dev/null
|
rm -f "$RUNFILE" &>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit ${RESULT}
|
exit ${RESULT}
|
||||||
|
Loading…
Reference in New Issue
Block a user