From: Thomas Haller Date: Thu, 7 Sep 2023 22:07:19 +0000 (+0200) Subject: tests/shell: redirect output of test script to file too X-Git-Tag: v1.0.9~119 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c9393e2468ee6cc27bbd9311839699deca6e17cc;p=thirdparty%2Fnftables.git 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 --- 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")"