Message ID | 20240104204614.1426027-4-pvorel@suse.cz |
---|---|
State | Changes Requested |
Headers | show |
Series | metadata: improvements | expand |
Hi! > +[ "$VERBOSE" ] && v="-v" The build system uses just V=1 for a verbose mode so we should probably be consistent... Other than that: Reviewed-by: Cyril Hrubis <chrubis@suse.cz> > for test in $tests; do > - a=$($top_builddir/metadata/metaparse -Iinclude -Itestcases/kernel/syscalls/utils/ "$test") > + a=$($top_builddir/metadata/metaparse $v -Iinclude -Itestcases/kernel/syscalls/utils/ "$test") > if [ -n "$a" ]; then > if [ -z "$first" ]; then > echo ',' > -- > 2.43.0 > > > -- > Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Cyril, > Hi! > > +[ "$VERBOSE" ] && v="-v" > The build system uses just V=1 for a verbose mode so we should probably > be consistent... We actually use both, see include/mk/env_pre.mk ifeq ($V,1) VERBOSE=1 endif Therefore should I use both here as well? [ "$VERBOSE" -o "$V" ] && v="-v" Kind regards, Petr
> Hi Cyril, > > Hi! > > > +[ "$VERBOSE" ] && v="-v" > > The build system uses just V=1 for a verbose mode so we should probably > > be consistent... > We actually use both, see include/mk/env_pre.mk > ifeq ($V,1) > VERBOSE=1 > endif > Therefore should I use both here as well? > [ "$VERBOSE" -o "$V" ] && v="-v" [ "$V" ] && VERBOSE=1 ... a=$($top_builddir/metadata/metaparse $VERBOSE -Iinclude -Itestcases/kernel/syscalls/utils/ "$test") (for global scope variable is better to use upper case) Kind regards, Petr > Kind regards, > Petr
Hi!
> Therefore should I use both here as well?
I guess checking for both in shell scripts is the easiest solution.
diff --git a/metadata/parse.sh b/metadata/parse.sh index 9dd097153..83a3683b5 100755 --- a/metadata/parse.sh +++ b/metadata/parse.sh @@ -36,8 +36,10 @@ else tests=$(find testcases/ -name '*.c' | sort) fi +[ "$VERBOSE" ] && v="-v" + for test in $tests; do - a=$($top_builddir/metadata/metaparse -Iinclude -Itestcases/kernel/syscalls/utils/ "$test") + a=$($top_builddir/metadata/metaparse $v -Iinclude -Itestcases/kernel/syscalls/utils/ "$test") if [ -n "$a" ]; then if [ -z "$first" ]; then echo ','
Signed-off-by: Petr Vorel <pvorel@suse.cz> --- metadata/parse.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)