From d20a9284357bbb28f0ae2ada76e4eee58bf07493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Thu, 26 Sep 2019 15:11:15 +0200 Subject: [PATCH] Fix system test error reporting on Windows 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.common | 1 + bin/tests/system/runall.sh | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/tests/system/conf.sh.common b/bin/tests/system/conf.sh.common index c9d0be366d..fa884e1abe 100644 --- a/bin/tests/system/conf.sh.common +++ b/bin/tests/system/conf.sh.common @@ -457,6 +457,7 @@ export ARPANAME export BIGKEY export CDS export CHECKZONE +export CYGWIN export DESCRIPTION export DIG export FEATURETEST diff --git a/bin/tests/system/runall.sh b/bin/tests/system/runall.sh index 52721c34c4..3246457919 100755 --- a/bin/tests/system/runall.sh +++ b/bin/tests/system/runall.sh @@ -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