mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-27 11:50:22 -04:00
Merge branch 'tidy-runall.sh-environment-variables-v9_11' into 'v9_11'
Tidy runall.sh environment variables See merge request isc-projects/bind9!18
This commit is contained in:
commit
cd3602b6a8
5 changed files with 36 additions and 16 deletions
|
|
@ -89,7 +89,7 @@ parallel.mk:
|
|||
for directory in $(PARALLEL) ; do \
|
||||
echo "" >> $@ ; \
|
||||
echo "test-`echo $$directory | tr _ -`:" >> $@ ; \
|
||||
echo " @$(SHELL) ./run.sh $$NOCLEAN -r -p $$port $$directory 2>&1 | tee $$directory/test.output" >> $@ ; \
|
||||
echo " @$(SHELL) ./run.sh -r -p $$port $$directory 2>&1 | tee $$directory/test.output" >> $@ ; \
|
||||
port=`expr $$port + 100` ; \
|
||||
done
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ parallel.mk:
|
|||
|
||||
test: parallel.mk subdirs
|
||||
@$(MAKE) -f parallel.mk check
|
||||
@$(SHELL) ./runsequential.sh $$NOCLEAN -r
|
||||
@$(SHELL) ./runsequential.sh -r
|
||||
@$(SHELL) ./testsummary.sh
|
||||
|
||||
check: test
|
||||
|
|
|
|||
|
|
@ -127,7 +127,10 @@ Running All The System Tests
|
|||
---
|
||||
To run all the system tests, enter the command:
|
||||
|
||||
sh runall.sh [-n] [numproc]
|
||||
sh runall.sh [-c] [-n] [numproc]
|
||||
|
||||
The optional flag "-c" forces colored output (by default system test output is
|
||||
not printed in color due to run.sh being piped through "tee").
|
||||
|
||||
The optional flag "-n" has the same effect as it does for "run.sh" - it causes
|
||||
the retention of all output files from all tests.
|
||||
|
|
@ -151,11 +154,13 @@ A run of all the system tests can also be initiated via make:
|
|||
make [-j numproc] test
|
||||
|
||||
In this case, retention of the output files after a test completes successfully
|
||||
is specified by setting the environment variable NOCLEAN to "-n" prior to
|
||||
running make, e.g.
|
||||
is specified by setting the environment variable SYSTEMTEST_NO_CLEAN to 1 prior
|
||||
to running make, e.g.
|
||||
|
||||
NOCLEAN=-n make [-j numproc] test
|
||||
SYSTEMTEST_NO_CLEAN=1 make [-j numproc] test
|
||||
|
||||
while setting environment variable SYSTEMTEST_FORCE_COLOR to 1 forces system
|
||||
test output to be printed in color.
|
||||
|
||||
|
||||
Running Multiple System Test Suites Simultaneously
|
||||
|
|
@ -712,7 +717,7 @@ the ports are assigned when the tests are run. This is achieved by having the
|
|||
when "make check" is run, and contains a target for each test of the form:
|
||||
|
||||
<test-name>:
|
||||
@$(SHELL) run.sh $$NOCLEAN -r -p <baseport> <test-name>
|
||||
@$(SHELL) run.sh -r -p <baseport> <test-name>
|
||||
|
||||
The <baseport> is unique and the values of <baseport> for each test are
|
||||
separated by at least 100 ports.
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ NZD=@NZD_TOOLS@
|
|||
#
|
||||
# Set up color-coded test output
|
||||
#
|
||||
if test -t 1 && type tput > /dev/null 2>&1 ; then
|
||||
if [ ${SYSTEMTEST_FORCE_COLOR:-0} -eq 1 ] || test -t 1 && type tput > /dev/null 2>&1 ; then
|
||||
COLOR_END=`tput setaf 4` # blue
|
||||
COLOR_FAIL=`tput setaf 1` # red
|
||||
COLOR_INFO=`tput bold` # bold
|
||||
|
|
|
|||
|
|
@ -14,9 +14,14 @@ SYSTEMTESTTOP=.
|
|||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
stopservers=true
|
||||
clean=true
|
||||
baseport=5300
|
||||
|
||||
if [ ${SYSTEMTEST_NO_CLEAN:-0} -eq 1 ]; then
|
||||
clean=false
|
||||
else
|
||||
clean=true
|
||||
fi
|
||||
|
||||
while getopts "knp:r" flag; do
|
||||
case "$flag" in
|
||||
k) stopservers=false ;;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@
|
|||
# Run all the system tests.
|
||||
#
|
||||
# Usage:
|
||||
# runall.sh [-n] [numprocesses]
|
||||
# runall.sh [-c] [-n] [numprocesses]
|
||||
#
|
||||
# -c Force colored output.
|
||||
#
|
||||
# -n Noclean. Keep all output files produced by all tests. These
|
||||
# can later be removed by running "cleanall.sh".
|
||||
|
|
@ -22,14 +24,19 @@
|
|||
SYSTEMTESTTOP=.
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
usage="Usage: ./runall.sh [-n] [numprocesses]"
|
||||
usage="Usage: ./runall.sh [-c] [-n] [numprocesses]"
|
||||
|
||||
# Handle "-n" switch if present.
|
||||
# Preserve values of environment variables which are already set.
|
||||
|
||||
NOCLEAN=""
|
||||
while getopts "n" flag; do
|
||||
SYSTEMTEST_FORCE_COLOR=${SYSTEMTEST_FORCE_COLOR:-0}
|
||||
SYSTEMTEST_NO_CLEAN=${SYSTEMTEST_NO_CLEAN:-0}
|
||||
|
||||
# Handle command line switches if present.
|
||||
|
||||
while getopts "cn" flag; do
|
||||
case "$flag" in
|
||||
n) NOCLEAN="-n" ;;
|
||||
c) SYSTEMTEST_FORCE_COLOR=1 ;;
|
||||
n) SYSTEMTEST_NO_CLEAN=1 ;;
|
||||
esac
|
||||
done
|
||||
export NOCLEAN
|
||||
|
|
@ -54,6 +61,9 @@ fi
|
|||
|
||||
# Run the tests.
|
||||
|
||||
export SYSTEMTEST_FORCE_COLOR
|
||||
export SYSTEMTEST_NO_CLEAN
|
||||
|
||||
status=0
|
||||
if [ "$CYGWIN" = "" ]; then
|
||||
# Running on Unix, use "make" to run tests in parallel.
|
||||
|
|
@ -66,7 +76,7 @@ else
|
|||
# used, the tests would be run sequentially anyway.)
|
||||
{
|
||||
for testdir in $SUBDIRS; do
|
||||
$SHELL run.sh $NOCLEAN $testdir || status=1
|
||||
$SHELL run.sh $testdir || status=1
|
||||
done
|
||||
} 2>&1 | tee "systests.output"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue