]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use the result of clean.sh and setup.sh command directly
authorOndřej Surý <ondrej@isc.org>
Mon, 11 May 2020 15:43:12 +0000 (17:43 +0200)
committerOndřej Surý <ondrej@isc.org>
Tue, 12 May 2020 06:48:01 +0000 (08:48 +0200)
bin/tests/system/run.sh.in

index 4585cd039f6732b52dd6bf08495fa596c75e8b91..62171603574cdb13d4e2e40a925574992fa08716 100644 (file)
@@ -185,10 +185,8 @@ fi
 # Clean up files left from any potential previous runs
 if test -f "$systest/clean.sh"
 then
-    ( cd "${systest}" && $SHELL clean.sh "$@" )
-    ret=$?
-    if [ $ret -ne 0 ]; then
-       echowarn "I:$systest:clean.sh script failed with $ret"
+    if ! ( cd "${systest}" && $SHELL clean.sh "$@" ); then
+       echowarn "I:$systest:clean.sh script failed"
     fi
 
 fi
@@ -196,10 +194,8 @@ fi
 # Set up any dynamically generated test data
 if test -f "$systest/setup.sh"
 then
-    ( cd "${systest}" && $SHELL setup.sh "$@" )
-    ret=$?
-    if [ $ret -ne 0 ]; then
-       echowarn "I:$systest:clean.sh script failed with $ret"
+    if ! ( cd "${systest}" && $SHELL setup.sh "$@" ); then
+       echowarn "I:$systest:clean.sh script failed"
     fi
 fi