Make sure testsuite can handle multiple dependent scripts (#2256)

Commit afc54d75a1 to the test suite to eliminate a separate
shell script did not take into account that there may be
multiple dependent test scripts which resulted in the
message:
`/bin/sh: line 7: [: too many arguments`.
when running the test suite.

Beware that this new version still makes use of non-posix GNU
extensions to `test`.

Signed-off-by: Egbert Eich <eich@suse.com>

Signed-off-by: Egbert Eich <eich@suse.com>
This commit is contained in:
Egbert Eich 2022-11-28 20:19:31 +01:00 committed by GitHub
parent eac2cd54e2
commit 158dff6b50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -209,7 +209,14 @@ $(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
chkname=`basename $(@:.chkexe_=.chkexe)`;\
log=`basename $(@:.chkexe_=.chklog)`; \
echo "============================"; \
if [ $${chkname} -nt $$cmd ] && [ $${chkname} -nt $(SCRIPT_DEPEND) ]; then \
newer=true; \
for i in $${cmd} $(SCRIPT_DEPEND); do \
if [ $${chkname} -ot $$i ]; then \
newer=false; \
break; \
fi; \
done; \
if $${newer}; then \
echo "No need to test $${tname} again."; \
else \
echo "============================" > $${log}; \