diff options
author | Thomas Haller <thaller@redhat.com> | 2023-09-08 00:07:19 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-09-08 11:50:41 +0200 |
commit | c9393e2468ee6cc27bbd9311839699deca6e17cc (patch) | |
tree | 406d15ed8d4b6171908409f58eb14a4f68727656 | |
parent | 9dbd0f2e38ca7206d779c4e44e01100684aacb4e (diff) |
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 <thaller@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
-rwxr-xr-x | tests/shell/run-tests.sh | 2 |
1 files changed, 2 insertions, 0 deletions
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")" |