aboutsummaryrefslogtreecommitdiff
path: root/test/run_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/run_test.sh')
-rwxr-xr-xtest/run_test.sh30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/run_test.sh b/test/run_test.sh
index 4d0df3d2f..0663f770f 100755
--- a/test/run_test.sh
+++ b/test/run_test.sh
@@ -1,33 +1,33 @@
#!/bin/sh
# vim: set ft=sh sw=4 sts=4 et :
-if test -f "$TEST_SCRIPT_DIR""$1"_"setup.sh" ; then
- echo ">>> setup for test $1"
- if ! "$TEST_SCRIPT_DIR""$1"_"setup.sh" ; then
- echo ">>> exiting with error for test $1"
+if test -f "$TEST_SCRIPT_DIR""${2:-${1}}"_"setup.sh" ; then
+ echo ">>> setup for test ${2:-${1}}"
+ if ! "$TEST_SCRIPT_DIR""${2:-${1}}"_"setup.sh" ; then
+ echo ">>> exiting with error for test ${2:-${1}}"
exit 255
fi
fi
-echo ">>> test $1"
-if ! $1 ; then
- if test -f "$TEST_SCRIPT_DIR""$1"_"cleanup.sh" ; then
- echo ">>> cleanup for test $1"
- "$TEST_SCRIPT_DIR""$1"_"cleanup.sh"
+echo ">>> test ${2:-${1}}"
+if ! ${@} ; then
+ if test -f "$TEST_SCRIPT_DIR""${2:-${1}}"_"cleanup.sh" ; then
+ echo ">>> cleanup for test ${2:-${1}}"
+ "$TEST_SCRIPT_DIR""${2:-${1}}"_"cleanup.sh"
fi
- echo ">>> exiting with error for test $1"
+ echo ">>> exiting with error for test ${2:-${1}}"
exit 255
fi
-if test -f "$TEST_SCRIPT_DIR""$1"_"cleanup.sh" ; then
- echo ">>> cleanup for test $1"
- if ! "$TEST_SCRIPT_DIR""$1"_"cleanup.sh" ; then
- echo ">>> exiting with error for test $1"
+if test -f "$TEST_SCRIPT_DIR""${2:-${1}}"_"cleanup.sh" ; then
+ echo ">>> cleanup for test ${2:-${1}}"
+ if ! "$TEST_SCRIPT_DIR""${2:-${1}}"_"cleanup.sh" ; then
+ echo ">>> exiting with error for test ${2:-${1}}"
exit 255
fi
fi
-echo ">>> exiting with success for test $1"
+echo ">>> exiting with success for test ${2:-${1}}"
exit 0