[PATCH] check: skip parsing if the file is not shell script.

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



From: Masayoshi Mizuma <m.mizuma@xxxxxxxxxxxxxx>

If we run tests using '*', for example './check xfs/*', we will
get following error messages. This patch introduces to avoid
the messages.

./check xfs/*
xfs/001.out - unknown test, ignored
xfs/002.out - unknown test, ignored
xfs/003.out - unknown test, ignored
xfs/004.out - unknown test, ignored
...

Signed-off-by: Masayoshi Mizuma <m.mizuma@xxxxxxxxxxxxxx>
---
 check | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/check b/check
index f3c8021d..96cb222f 100755
--- a/check
+++ b/check
@@ -339,6 +339,10 @@ if $have_test_arg; then
 				test_dir=`dirname $t`
 				test_dir=${test_dir#$SRC_DIR/*}
 				test_name=`basename $t`
+				if ! file -bi $SRC_DIR/$test_dir/$test_name | \
+					egrep -q 'text/x-shellscript'; then
+					continue
+				fi
 				group_file=$SRC_DIR/$test_dir/group
 
 				if egrep -q "^$test_name" $group_file; then
-- 
2.18.0




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux