From b24c2e11d85db48f364f3cca94b3ba8e75eca138 Mon Sep 17 00:00:00 2001 From: Stephen Morris Date: Fri, 24 Nov 2017 12:50:19 +0000 Subject: [PATCH] [rt46602] More updates to the test running framework Tidy up the stop/start files and make switch usage consistent. Also tidy up the various "clean" targets in the Makefile. --- bin/tests/system/Makefile.in | 9 +++++- bin/tests/system/run.sh | 2 +- bin/tests/system/start.pl | 63 ++++++++++++++++++++++++------------ bin/tests/system/stop.pl | 37 ++++++++++----------- 4 files changed, 70 insertions(+), 41 deletions(-) diff --git a/bin/tests/system/Makefile.in b/bin/tests/system/Makefile.in index f14118acc4..34f003d6ea 100644 --- a/bin/tests/system/Makefile.in +++ b/bin/tests/system/Makefile.in @@ -75,13 +75,20 @@ test: parallel.mk check: test -# Other targets. +# Other targets: +# +# testclean - delete files generated by running tests +# clean - As for testclean, but also delete files built for the tests by "make" +# distclean - As for clean, but also delete test-related files generated by +# "configure" testclean clean distclean:: if test -f ./cleanall.sh; then $(SHELL) ./cleanall.sh; fi rm -f systests.output rm -f random.data rm -f parallel.mk + +clean distclean:: rm -f ${TARGETS} rm -f ${OBJS} diff --git a/bin/tests/system/run.sh b/bin/tests/system/run.sh index 68bc86c187..7b1e0af2af 100644 --- a/bin/tests/system/run.sh +++ b/bin/tests/system/run.sh @@ -93,7 +93,7 @@ then fi # Start name servers running -$PERL start.pl -p $port $test || { echofail "R:$test:FAIL"; echoinfo "E:$test:`date $dateargs`"; exit 1; } +$PERL start.pl --port $port $test || { echofail "R:$test:FAIL"; echoinfo "E:$test:`date $dateargs`"; exit 1; } # Run the tests ( cd $test ; $SHELL tests.sh -p "$port" -- "$@" ) diff --git a/bin/tests/system/start.pl b/bin/tests/system/start.pl index f29f1301df..179e8d09e5 100644 --- a/bin/tests/system/start.pl +++ b/bin/tests/system/start.pl @@ -16,39 +16,60 @@ use Cwd; use Cwd 'abs_path'; use Getopt::Long; -# Option handling -# --noclean test [server [options]] +# Usage: +# perl start.pl [--noclean] --restart] [--port port] test [server [options]] # -# --noclean - Do not cleanup files in server directory -# test - name of the test directory -# server - name of the server directory -# options - alternate options for the server -# NOTE: options must be specified with '-- "