[netfilter-cvslog] r3318 - trunk/nfsim-testsuite
rusty at netfilter.org
rusty at netfilter.org
Fri Dec 10 08:03:58 CET 2004
Author: rusty at netfilter.org
Date: 2004-12-10 08:03:57 +0100 (Fri, 10 Dec 2004)
New Revision: 3318
Modified:
trunk/nfsim-testsuite/test.sh
Log:
Add -k option, to keep going across failures.
Modified: trunk/nfsim-testsuite/test.sh
===================================================================
--- trunk/nfsim-testsuite/test.sh 2004-12-10 06:57:41 UTC (rev 3317)
+++ trunk/nfsim-testsuite/test.sh 2004-12-10 07:03:57 UTC (rev 3318)
@@ -16,14 +16,15 @@
VERBOSE=1
fi
shift;;
+ -k) KEEP_GOING=1; shift;;
--nfsim=*) NFSIM=`echo "$1" | cut -d= -f2-`; shift;;
--*)
- echo "Usage $0 [-vv|-v|--nfsim=<nfsim>]" >&2; exit 1;;
+ echo "Usage $0 [-k|-vv|-v|--nfsim=<nfsim>]" >&2; exit 1;;
*) break;;
esac
done
-NFSIM_ARGS="$NFSIM_ARGS -e"
+NFSIM_ARGS="$NFSIM_ARGS -e -a"
# Creates a temporary file and exports the name of the file to
# the provided argument. Exits on error.
@@ -55,7 +56,9 @@
failed()
{
+ echo
echo "Test for $1 failed." >&2
+ if [ -n "$KEEP_GOING" ]; then return 0; fi
exit 1
}
@@ -63,7 +66,7 @@
{
VG_NFSIM=$1
shift
- valgrind -q --suppressions=nfsim-testsuite/valgrind-suppressions --num-callers=8 --logfile-fd=3 $VG_NFSIM "$@" 3>/tmp/valgrind
+ valgrind -q --suppressions=valgrind-suppressions --num-callers=8 --logfile-fd=3 $VG_NFSIM "$@" 3>/tmp/valgrind
VG_RESULT=$?
if [ -s /tmp/valgrind ]; then
@@ -89,7 +92,7 @@
TMPFILE=`create_tempfile`
export TMPFILE
-for dir in `find nfsim-testsuite/* -name '.*' -prune -o \( -type d -print \)| sort`; do
+for dir in `find * -name '.*' -prune -o \( -type d -print \)| sort`; do
if [ -z "$VERBOSE" ]; then
echo -n Running tests for $dir.
else
@@ -108,12 +111,12 @@
*~)
continue;;
*.sh)
- sh -e $EXTRA_ARGS "$f" || failed "$f";;
+ sh -e $EXTRA_ARGS "$f" || failed "$f" || FAILED=1;;
*.sim)
- $NFSIM $NFSIM_ARGS < "$f" || failed "$f";;
+ $NFSIM $NFSIM_ARGS < "$f" || failed "$f" || FAILED=1;;
*)
echo Unknown test type "$f" >&2
- failed "$f";;
+ failed "$f" || FAILED=1;;
esac
if [ -z "$VERBOSE" ]; then
echo -n .
@@ -124,4 +127,4 @@
if [ -z "$VERBOSE" ]; then echo; fi
done
-exit 0
+[ -n "$FAILED" ]
More information about the netfilter-cvslog
mailing list