From c9393e2468ee6cc27bbd9311839699deca6e17cc Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 8 Sep 2023 00:07:19 +0200 Subject: tests/shell: redirect output of test script to file too It's useful to keep around for later. Redirect to the temporary directory. Note that the file content may be colorized too. `less -R` helps with that. Signed-off-by: Thomas Haller Signed-off-by: Florian Westphal --- tests/shell/run-tests.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/shell/run-tests.sh') diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh index e4efbb2d..4c1ab29b 100755 --- a/tests/shell/run-tests.sh +++ b/tests/shell/run-tests.sh @@ -382,6 +382,8 @@ NFT_TEST_TMPDIR="$(mktemp --tmpdir="$_TMPDIR" -d "nft-test.$(date '+%Y%m%d-%H%M% msg_error "Failure to create temp directory in \"$_TMPDIR\"" chmod 755 "$NFT_TEST_TMPDIR" +exec &> >(tee "$NFT_TEST_TMPDIR/test.log") + NFT_REAL="${NFT_REAL-$NFT}" msg_info "conf: NFT=$(printf '%q' "$NFT")" -- cgit v1.2.3