[LTP] [PATCH v2 2/8] metadata: test.sh: Print the test name and result
Petr Vorel
pvorel@suse.cz
Fri Jul 10 07:55:50 CEST 2026
Always print the test name with the result. This helps a readability
in the CI.
* multiline_macro.c [OK]
* regression.c [FAIL]
regression.c output differs!
--- tmp.json 2026-07-09 14:27:15.590074023 +0200
+++ regression.c.json 2026-07-09 14:27:06.083967188 +0200
@@ -6,7 +6,7 @@
]
],
"doc": [
- "Test for regression group derived from the linux-git tag."
+ "Test for regression group derived from the foo tag."
],
"groups": [
"regression"
* tags.c [OK]
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
* The same as in v1
metadata/tests/test.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/metadata/tests/test.sh b/metadata/tests/test.sh
index 475d721df0..a9ebc768f9 100755
--- a/metadata/tests/test.sh
+++ b/metadata/tests/test.sh
@@ -3,13 +3,15 @@
fail=0
for i in *.c; do
+ printf "* $i "
../metaparse $i > tmp.json
if ! diff tmp.json $i.json >/dev/null 2>&1; then
- echo "***"
+ echo '[FAIL]'
echo "$i output differs!"
diff -u tmp.json $i.json
- echo "***"
fail=1
+ else
+ echo '[OK]'
fi
done
--
2.54.0
More information about the ltp
mailing list