Max Reitz <mre...@redhat.com> writes:
> On 09.05.19 18:59, Alex Bennée wrote: >> This attempts to clean-up the output to better match the output of the >> rest of the QEMU check system. This includes: >> >> - formatting as " TEST iotest: nnn" >> - calculating time diff at the end >> - only dumping config on failure >> >> Signed-off-by: Alex Bennée <alex.ben...@linaro.org> >> Message-Id: <20190503143904.31211-1-alex.ben...@linaro.org> >> --- >> tests/qemu-iotests/check | 101 +++++++++++++++++++++++---------------- >> 1 file changed, 61 insertions(+), 40 deletions(-) > > Hm, this makes every iotest print two lines: > > $ ./check -T -qcow2 > [...] > 001 [20:06:27] -> [20:06:27] > 001 0s (last 1s) Yes - it was a compromise to ensure we printed a start and end timestamp but I guess we can fix it up with a bit more shell ugliness: --8<---------------cut here---------------start------------->8--- Subject: [PATCH] fixup! tests/qemu-iotests: re-format output to for make check-block --- tests/qemu-iotests/check | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index fb239967a32..9f083f06b46 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -726,7 +726,11 @@ _report_test_result() if $pretty; then echo " TEST iotest: $1 $2" else - echo "$1 $2" + if $timestamp; then + echo " $2" + else + echo "$1 $2" + fi fi } @@ -793,7 +797,7 @@ do $run_command >$tmp.out 2>&1) fi sts=$? - $timestamp && echo " [$(date "+%T")]" + $timestamp && echo -n " [$(date "+%T")]" stop=$(_wallclock) if [ -f core ] --8<---------------cut here---------------end--------------->8--- -- Alex Bennée