From ce4403c185c7c7b15fc044964305cff94f77396e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 6 Sep 2023 13:52:14 +0200 Subject: tests/shell: rework printing of test results - "test-wrapper.sh" no longer will print the test output to its stdout. Instead, it only writes the testout.log file. - rework the loop "run-tests.sh" for printing the test results. It no longer captures the output of the test, as the wrapper is expected to be silent. Instead, they get the output from the result directory. The benefit is, that there is no duplication in what we print and the captured data in the result directory. The verbose mode is only for convenience, to safe looking at the test data. It's not essential otherwise. - also move the evaluation of the test result (and printing of the information) to a separate function. Later we want to run tests in parallel, so the steps need to be clearly separated. Signed-off-by: Thomas Haller Signed-off-by: Florian Westphal --- tests/shell/helpers/test-wrapper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/shell/helpers/test-wrapper.sh') diff --git a/tests/shell/helpers/test-wrapper.sh b/tests/shell/helpers/test-wrapper.sh index dd5ce7ac..bdbe2c37 100755 --- a/tests/shell/helpers/test-wrapper.sh +++ b/tests/shell/helpers/test-wrapper.sh @@ -12,7 +12,7 @@ TESTDIR="$(dirname "$TEST")" printf '%s\n' "$TEST" > "$NFT_TEST_TESTTMPDIR/name" rc_test=0 -"$TEST" |& tee "$NFT_TEST_TESTTMPDIR/testout.log" || rc_test=$? +"$TEST" &> "$NFT_TEST_TESTTMPDIR/testout.log" || rc_test=$? $NFT list ruleset > "$NFT_TEST_TESTTMPDIR/ruleset-after" -- cgit v1.2.3