xfs
[Top] [All Lists]

[PATCH 4/5] xfstests: accept tests/ prefix for test name on commandline

To: xfs@xxxxxxxxxxx
Subject: [PATCH 4/5] xfstests: accept tests/ prefix for test name on commandline
From: David Sterba <dsterba@xxxxxxx>
Date: Thu, 16 Jan 2014 18:07:14 +0100
Cc: David Sterba <dsterba@xxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <cover.1389891730.git.dsterba@xxxxxxx>
In-reply-to: <cover.1389891730.git.dsterba@xxxxxxx>
References: <cover.1389891730.git.dsterba@xxxxxxx>
References: <cover.1389891730.git.dsterba@xxxxxxx>
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@xxxxxxx>
---
 check | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/check b/check
index d578e49b78d4..a787c4a9f69f 100755
--- a/check
+++ b/check
@@ -263,12 +263,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"
-- 
1.8.5

<Prev in Thread] Current Thread [Next in Thread>