From 68978f924159b5fc10899941b062e3cc034c8124 Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Sat, 8 Oct 2022 15:41:42 +0800 Subject: [PATCH] selftest: Only iterate the .sh files for test execution Previously, all files within $TESTCASEDIR/$test_case are regarded as shell script files for testing. However there might be config files under the directory. So let's only iterate the .sh files. Signed-off-by: Tao Liu Reviewed-by: Philipp Rudo --- tests/scripts/run-test.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/scripts/run-test.sh b/tests/scripts/run-test.sh index 1501db4..0b589f7 100755 --- a/tests/scripts/run-test.sh +++ b/tests/scripts/run-test.sh @@ -85,8 +85,7 @@ for test_case in $testcases; do results[$test_case]="" testdir=$TESTCASEDIR/$test_case - script_num=$(ls -1 $testdir | wc -l) - scripts=$(ls -r -1 $testdir | tr '\n' ' ') + scripts=$(ls -r -1 $testdir | egrep "\.sh$" | tr '\n' ' ') test_outputs="" read main_script aux_script <<< "$scripts"