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
test: parallel.mk subdirs
@$(MAKE) -f parallel.mk check
- @$(SHELL) ./runsequential.sh $$NOCLEAN -r
+ @$(SHELL) ./runsequential.sh -r
@$(SHELL) ./testsummary.sh
check: test
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
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.
. $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 ;;
usage="Usage: ./runall.sh [-n] [numprocesses]"
+SYSTEMTEST_NO_CLEAN=0
+
# Handle "-n" switch if present.
-NOCLEAN=""
while getopts "n" flag; do
case "$flag" in
- n) NOCLEAN="-n" ;;
+ n) SYSTEMTEST_NO_CLEAN=1 ;;
esac
done
export NOCLEAN
# Run the tests.
+export SYSTEMTEST_NO_CLEAN
+
status=0
if [ "$CYGWIN" = "" ]; then
# Running on Unix, use "make" to run tests in parallel.
# 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