]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
check: accept tests/ prefix for test name on commandline
authorDavid Sterba <dsterba@suse.cz>
Mon, 20 Jan 2014 02:28:39 +0000 (13:28 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 20 Jan 2014 02:28:39 +0000 (13:28 +1100)
Just for convenience to let tab completion or shell globs work (files
that are not in the group file are ignored).

Signed-off-by: David Sterba <dsterba@suse.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
check

diff --git a/check b/check
index 320ad26b7c2cc2cd63770570608685dacc6eefaf..61fb91b82316475b3fa764c122df1822e96d990e 100755 (executable)
--- a/check
+++ b/check
@@ -262,12 +262,13 @@ if $have_test_arg; then
                        exit $status
                        ;;
                *)      test_dir=`dirname $1`
+                       test_dir=${test_dir#$SRC_DIR/*}
                        test_name=`basename $1`
                        group_file=$SRC_DIR/$test_dir/group
 
                        if egrep "^$test_name" $group_file >/dev/null ; then
                                # in group file ... OK
-                               echo $SRC_DIR/$1 >>$tmp.arglist
+                               echo $SRC_DIR/$test_dir/$test_name >>$tmp.arglist
                        else
                                # oops
                                echo "$1 - unknown test, ignored"