generic: new case to test getcwd(2)
[xfstests-dev.git] / check
diff --git a/check b/check
index ed1834dcc1dd4cb453813f7351f909963beb0ba1..b1eaed2620d0d993096611a07c2b61edfd183874 100755 (executable)
--- a/check
+++ b/check
@@ -75,11 +75,13 @@ check options
     -T                 output timestamps
     -r                 randomize test order
     --large-fs         optimise scratch device for large filesystems
+    -s section         run only specified section from config file
 
 testlist options
     -g group[,group...]        include tests from these groups
     -x group[,group...]        exclude tests from these groups
     -X file            exclude individual tests
+    -E external_file   exclude individual tests
     [testlist]         include tests matching names in testlist
 '
            exit 0
@@ -138,7 +140,7 @@ trim_test_list()
 
 _wallclock()
 {
-    date "+%H %M %S" | $AWK_PROG '{ print $1*3600 + $2*60 + $3 }'
+    date "+%s"
 }
 
 _timestamp()
@@ -221,7 +223,12 @@ while [ $# -gt 0 ]; do
                        done
                done
                ;;
-
+       -E)     xfile=$2; shift ;
+               if [ -f $xfile ]; then
+                       cat "$xfile" >> $tmp.xlist
+               fi
+               ;;
+       -s)     RUN_SECTION="$RUN_SECTION $2"; shift ;;
        -l)     diff="diff" ;;
        -udiff) diff="$diff -u" ;;
 
@@ -389,6 +396,19 @@ for section in $HOST_OPTIONS_SECTIONS; do
        OLD_MOUNT_OPTIONS=$MOUNT_OPTIONS
        get_next_config $section
 
+       # Do we need to run only some sections ?
+       if [ ! -z "$RUN_SECTION" ]; then
+               skip=true
+               for s in $RUN_SECTION; do
+                       if [ $section == $s ]; then
+                               skip=false
+                       fi
+               done
+               if $skip; then
+                       continue
+               fi
+       fi
+
        mkdir -p $RESULT_BASE
        if [ ! -d $RESULT_BASE ]; then
                echo "failed to create results directory $RESULT_BASE"