Message ID | 20240104204614.1426027-5-pvorel@suse.cz |
---|---|
State | Changes Requested |
Headers | show |
Series | metadata: improvements | expand |
Hi! > diff --git a/metadata/tests/test.sh b/metadata/tests/test.sh > index 475d721df..a00e32bb4 100755 > --- a/metadata/tests/test.sh > +++ b/metadata/tests/test.sh > @@ -3,6 +3,7 @@ > fail=0 > > for i in *.c; do > + [ "$VERBOSE" ] && echo "$0: testing $i" Here as well, just use $V instead, and maybe it does not make sense to print the $0. Possibly just "parsing $i". > ../metaparse $i > tmp.json > if ! diff tmp.json $i.json >/dev/null 2>&1; then > echo "***" > @@ -15,4 +16,5 @@ done > > rm -f tmp.json > > +[ "$VERBOSE" ] && echo "$fail" Maybe it would make more sense to print pass/fail for each file, i.e. Parsing array_size01.c Pass Parsing array_size02.c Pass Parsing array_size03.c Fail ... > exit $fail > -- > 2.43.0 > > > -- > Mailing list info: https://lists.linux.it/listinfo/ltp
> Hi! > > diff --git a/metadata/tests/test.sh b/metadata/tests/test.sh > > index 475d721df..a00e32bb4 100755 > > --- a/metadata/tests/test.sh > > +++ b/metadata/tests/test.sh > > @@ -3,6 +3,7 @@ > > fail=0 > > for i in *.c; do > > + [ "$VERBOSE" ] && echo "$0: testing $i" > Here as well, just use $V instead, and maybe it does not make sense to > print the $0. Possibly just "parsing $i". Make sense. > > ../metaparse $i > tmp.json > > if ! diff tmp.json $i.json >/dev/null 2>&1; then > > echo "***" > > @@ -15,4 +16,5 @@ done > > rm -f tmp.json > > +[ "$VERBOSE" ] && echo "$fail" > Maybe it would make more sense to print pass/fail for each file, i.e. > Parsing array_size01.c Pass > Parsing array_size02.c Pass > Parsing array_size03.c Fail +1 for i in *.c; do ../metaparse $i > tmp.json [ "$VERBOSE" ] && echo "***** Parsing $i *****" if ! diff tmp.json $i.json >/dev/null 2>&1; then echo "***" echo "$i output differs!" diff -u tmp.json $i.json echo "***" fail=1 [ "$VERBOSE" ] && echo "$i: FAIL" else [ "$VERBOSE" ] && echo "$i: PASS" fi done Kind regards, Petr
diff --git a/metadata/tests/test.sh b/metadata/tests/test.sh index 475d721df..a00e32bb4 100755 --- a/metadata/tests/test.sh +++ b/metadata/tests/test.sh @@ -3,6 +3,7 @@ fail=0 for i in *.c; do + [ "$VERBOSE" ] && echo "$0: testing $i" ../metaparse $i > tmp.json if ! diff tmp.json $i.json >/dev/null 2>&1; then echo "***" @@ -15,4 +16,5 @@ done rm -f tmp.json +[ "$VERBOSE" ] && echo "$fail" exit $fail
Signed-off-by: Petr Vorel <pvorel@suse.cz> --- metadata/tests/test.sh | 2 ++ 1 file changed, 2 insertions(+)