]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix system test error reporting on Windows
authorMichał Kępień <michal@isc.org>
Thu, 26 Sep 2019 13:11:15 +0000 (15:11 +0200)
committerMichał Kępień <michal@isc.org>
Fri, 27 Sep 2019 10:13:39 +0000 (12:13 +0200)
Make sure the CYGWIN environment variable is set whenever system tests
are run on Windows to prevent stop.pl from making incorrect assumptions
about the environment it is running in, which triggers e.g. false
reports about named instances crashing on shutdown when system tests are
run on Windows.  This issue has not been caught earlier because the
CYGWIN environment variable was incidentally being set on a higher level
in our Windows test environments.

Error reporting for parallel system tests on Windows has been broken all
along: since all parallel.mk targets generated by parallel.sh pipe their
output through "tee", the return code from run.sh is lost and thus
running "make -f parallel.mk check" will not yield a non-zero return
code if some system tests fail.  The same applies to runsequential.sh.
Yet, runall.sh on Windows only sets its return code to a non-zero value
if either "make -f parallel.mk check" or runsequential.sh returns a
non-zero return code.  Fix by making runall.sh yield a non-zero return
code when testsummary.sh fails, which is the same approach as the one
used in the "test" target in bin/tests/system/Makefile.

(cherry picked from commit fed397c04bb3cfda453dc9d7f2f06b5164726047)

bin/tests/system/conf.sh.in
bin/tests/system/conf.sh.win32
bin/tests/system/runall.sh

index cedabbee8c1d13f7e28c54eb768076b48aa6be86..fb87c8e6bb3f49fd4e412a1e8af86c3920bbcc58 100644 (file)
@@ -427,6 +427,7 @@ copy_setports() {
 export ARPANAME
 export BIGKEY
 export CHECKZONE
+export CYGWIN
 export DESCRIPTION
 export DIG
 export FEATURETEST
index 8ac41ff82764b40de5d1f1180d1625c6b7c25ff6..97628663e13dd7a077dea20d90c35725f2191134 100644 (file)
@@ -405,6 +405,7 @@ copy_setports() {
 export ARPANAME
 export BIGKEY
 export CHECKZONE
+export CYGWIN
 export DESCRIPTION
 export DIG
 export FEATURETEST
index 52721c34c4e1433bda8bc36e3b39445810c39a68..3246457919cd4c93a6842b1bc66aee6c9e8db518 100755 (executable)
@@ -79,9 +79,9 @@ if [ "$NOPARALLEL" = "" ]; then
         # used for the build. So we create a special makefile for the purpose
         # of parallel execution of system tests, and use that.
         $SHELL parallel.sh > parallel.mk
-        make -f parallel.mk -j $numproc check || status=$?
-       $SHELL ./runsequential.sh -r || status=$?
-       $SHELL ./testsummary.sh
+        make -f parallel.mk -j $numproc check
+        $SHELL ./runsequential.sh -r
+        $SHELL ./testsummary.sh || status=1
     fi
 else
     # the NOPARALLEL environment variable indicates that tests must be