qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PATCH v1 22/23] tests/qemu-iotests: re-format output to


From: Alex Bennée
Subject: Re: [Qemu-arm] [PATCH v1 22/23] tests/qemu-iotests: re-format output to for make check-block
Date: Thu, 09 May 2019 21:38:09 +0100
User-agent: mu4e 1.3.1; emacs 26.1

Max Reitz <address@hidden> 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 <address@hidden>
>> Message-Id: <address@hidden>
>> ---
>>  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]