Whamcloud - gitweb
Fix test in ext2fs_check_desc() for inode table within block group
[tools/e2fsprogs.git] / tests / test_script.in
index 8778882..9dbbaf8 100644 (file)
@@ -3,8 +3,14 @@
 # Test script for e2fsck
 #
 
+case "$1" in 
+    --valgrind)
+       export USE_VALGRIND="valgrind -q --weird-hacks=lax-ioctls"
+       shift;
+esac
+
 if test "$1"x = x ; then
-  TESTS=`ls -d $SRCDIR/[a-zA-Z]_* | egrep -v "\.failed|\.new"`
+  TESTS=`ls -d $SRCDIR/[a-zA-Z]_* | $EGREP -v "\.failed|\.new"`
 else
   TESTS=
   for i 
@@ -35,6 +41,9 @@ do
                echo "The test '$test_name' does not exist."
                continue;
        fi
+       if [ -z "`ls $test_dir`" ]; then
+               continue
+       fi
        if [ -f $test_dir/name ]; then
                test_description=`cat $test_dir/name`
                printf "%s: %s: " "$test_name" "$test_description"
@@ -59,3 +68,4 @@ num_failed=`ls *.failed 2>/dev/null | wc -l`
 
 echo "$num_ok tests succeeded  $num_failed tests failed"
 
+test "$num_failed" -eq 0 || exit 1