From: Stephen Morris Date: Fri, 15 Dec 2017 15:56:33 +0000 (+0000) Subject: [rt46602] Ensure test output in systests.output is not mixed up X-Git-Tag: v9.13.0~158^2~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=055e5be9fd7555e24449157bc78b8c0852f9b7d1;p=thirdparty%2Fbind9.git [rt46602] Ensure test output in systests.output is not mixed up When running all the system tests, output from a test is sent to a test.output file in the test directory. These are combined in to systests.output when the run finishes. --- diff --git a/bin/tests/system/.gitignore b/bin/tests/system/.gitignore index cf6c4980446..e4b179d6713 100644 --- a/bin/tests/system/.gitignore +++ b/bin/tests/system/.gitignore @@ -6,5 +6,6 @@ named.pid named.run named.port /feature-test +**/test.output /systests.output /random.data diff --git a/bin/tests/system/Makefile.in b/bin/tests/system/Makefile.in index f1bd914888c..50e850530de 100644 --- a/bin/tests/system/Makefile.in +++ b/bin/tests/system/Makefile.in @@ -60,15 +60,15 @@ parallel.mk: for directory in $(PARALLEL) ; do \ echo "" >> $@ ; \ echo "$$directory:" >> $@ ; \ - echo " @$(SHELL) ./run.sh -p $$port $$directory" >> $@ ; \ + echo " @$(SHELL) ./run.sh -r -p $$port $$directory | tee $$directory/test.output" >> $@ ; \ port=`expr $$port + 100` ; \ done # Targets to run the tests. test: parallel.mk - @$(MAKE) -f parallel.mk check 2>&1 | tee systests.output - @$(SHELL) ./runsequential.sh 2>&1 | tee -a systests.output + @$(MAKE) -f parallel.mk check + @$(SHELL) ./runsequential.sh -r @$(SHELL) ./testsummary.sh check: test diff --git a/bin/tests/system/README b/bin/tests/system/README index 8d21f2cced5..81b00bab2bc 100644 --- a/bin/tests/system/README +++ b/bin/tests/system/README @@ -107,6 +107,9 @@ Optional flags are: the date looking like "2017-11-23:16:06:32" instead of the default "Thu, 23 Nov 2017 16:06:32 +0000". + -r The "runall" flag. This is related to cleaning up after + all the tests. (See "Mainenance Notes" below.) + Arguments are: test-name Mandatory. The name of the test, which is the name of the @@ -136,9 +139,9 @@ It is also possible to run the test suites from two installations of BIND on the same machine at the same time. To do this: 1. Each installation must have its own directory tree. The system tests create -temporary configuration files in the test directories, so separate directory -trees are required to avoid interference between the same test running in the -different installations. +files in the test directories, so separate directory trees are required to +avoid interference between the same test running in the different +installations. 2. For one of the test suites, the starting port number must be specified by setting the environment variable STARTPORT before starting the test suite. @@ -158,12 +161,12 @@ abouts). The use of "STARTPORT=20000" to prefix the run of the test suite for installation-2 will mean the test suite uses ports 20,000 through 30,000 or so. Parallel running will reduce the total time taken to run the BIND system tests, -but will mean that the output from all the tests will be mixed up with one -another in the systests.output file. However, if you need to investigate the -output from a test, there is a simple way of extracting the information. -Before discussing this though, the format of the test messages needs to be -understood. +but will mean that the output from all the tests pointed to the screen will be +mixed up with one another. However, the systests.output file produced at the +end of the run will contain the output from each test, one after the other. +Format of Test Output +--- All output from the system tests is in the form of lines with the following structure: @@ -219,18 +222,6 @@ the form: e.g. nsupdate.out.test28, dig.out.q3. This aids diagnosis of problems by allowing the output that caused the problem to be identified. -Returning to the problem of extracting information about a single test from -systests.output, the solution is fairly easy: run the command: - - grep '::' systests.output - -e.g. - - grep ':catz:' systests.output - -(note the colons before and after the test name). This will list all the -messages produced by the test in the order they were output. - Re-running the Tests === @@ -257,6 +248,7 @@ Developer Notes === This section is intended for developers writing new tests. + Overview --- As noted above, each test suite is in a separate directory. To interact with @@ -328,11 +320,30 @@ General --- 1. Each of the four scripts will be invoked with the command - sh