Print the 'EXECUTING' status line only if stdout is a terminal, the
mandatory following escape sequence to delete it messes up log file
contents.
Signed-off-by: Phil Sutter <phil@nwl.cc>
local testfile="$1"
local testidx="$2"
- if [ "$NFT_TEST_JOBS" -le 1 ] ; then
+ if [ "$NFT_TEST_JOBS" -le 1 ] && [[ -t 1 ]]; then
print_test_header I "$testfile" "$testidx" "EXECUTING"
fi
$NFT_TEST_UNSHARE_CMD "$NFT_TEST_BASEDIR/helpers/test-wrapper.sh" "$testfile"
local rc_got=$?
- if [ "$NFT_TEST_JOBS" -le 1 ] ; then
+ if [ "$NFT_TEST_JOBS" -le 1 ] && [[ -t 1 ]]; then
echo -en "\033[1A\033[K" # clean the [EXECUTING] foobar line
fi