summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2012-05-28 10:51:43 +1000
committerNeilBrown <neilb@suse.de>2012-05-28 10:51:43 +1000
commitb8e91a32cdaa2a6dea8b0dd54365ede33d5a9a60 (patch)
tree430ccd11fb655c57567dd5bbe4d96deecd475b3e /test
parent6038155520b481adbb74c6e5867628ec6e6161f9 (diff)
Add --no-error argument to 'test'
This allows the test suite to run to completion even if one test fails. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'test')
-rwxr-xr-xtest8
1 files changed, 6 insertions, 2 deletions
diff --git a/test b/test
index 1abb2590..12741be3 100755
--- a/test
+++ b/test
@@ -19,6 +19,7 @@ fi
testdir="tests"
logdir="$testdir/logs"
logsave=0
+exitonerror=1
# Check whether to run multipath tests
modprobe multipath 2> /dev/null
@@ -230,7 +231,7 @@ do_test() {
if [ "$savelogs" == "1" ]; then
cp $targetdir/log $logdir/$_basename.log
fi
- if [ "$_fail" == "1" ]; then
+ if [ "$_fail" == "1" -a "$exitonerror" == "1" ]; then
exit 1
fi
fi
@@ -238,7 +239,7 @@ do_test() {
do_help() {
echo "Usage: "
- echo " $0 [--tests=<test1,test2,..>] [--disable-multipath] [--logdir] [--save-logs] [setup] [prefix]"
+ echo " $0 [--tests=<test1,test2,..>] [--disable-multipath] [--logdir] [--save-logs] [--no-error] [setup] [prefix]"
}
parse_args() {
@@ -267,6 +268,9 @@ parse_args() {
fi
fi
;;
+ --no-error)
+ exit_on_error=0
+ ;;
--disable-multipath)
unset MULTIPATH
;;