[LTP] [PATCH 2/9] metadata: parse.sh: Allow to pass list of files
Petr Vorel
pvorel@suse.cz
Thu Jan 4 21:46:07 CET 2024
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
metadata/parse.sh | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/metadata/parse.sh b/metadata/parse.sh
index 69bf5db65..9dd097153 100755
--- a/metadata/parse.sh
+++ b/metadata/parse.sh
@@ -2,6 +2,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) 2019 Cyril Hrubis <chrubis@suse.cz>
# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
+# Copyright (c) Linux Test Project, 2022-2024
set -e
top_builddir=$PWD/..
@@ -29,7 +30,13 @@ echo ' "tests": {'
first=1
-for test in `find testcases/ -name '*.c'|sort`; do
+if [ $# -gt 0 ]; then
+ tests=$*
+else
+ tests=$(find testcases/ -name '*.c' | sort)
+fi
+
+for test in $tests; do
a=$($top_builddir/metadata/metaparse -Iinclude -Itestcases/kernel/syscalls/utils/ "$test")
if [ -n "$a" ]; then
if [ -z "$first" ]; then
--
2.43.0
More information about the ltp
mailing list