Re: [PATCH] tests/hwsim/run-tests.py: align stdout output

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

 



On Fri, Feb 08, 2019 at 10:39:39AM +0100, Arnout Vandecappelle (Essensium/Mind) wrote:
> When running tests and all goes well, the output of run-tests looks like
> this:
> 
> START the_first_test 1/2
> PASS the_first_test 2.093176 2019-02-08 10:29:09.888411
> START the_second_test 2/2
> PASS the_second_test 0.640633 2019-02-08 10:29:10.530014
> 
> i.e. the test names are not aligned. This makes the output look a bit
> messy to the human eye. In particular, it makes it difficult to quickly
> get an idea of which tests have already run.
> 
> To fix this, add an extra space after the test result. The rest result
> is always 4 characters: PASS, FAIL or SKIP. Adding a space aligns it
> with the 5 characters of START.
> 
> This gives the much nicer output
> 
> START the_first_test 1/2
> PASS  the_first_test 2.093176 2019-02-08 10:29:09.888411
> START the_second_test 2/2
> PASS  the_second_test 0.640633 2019-02-08 10:29:10.530014

That might look nicer to human eyes, but the run-tests.sh output is
meant for parsing by scripts. This change would break vm/parallel-vm.py
and it would also break the "cut -f2 -d' '" that I use in number of
manual operations to find the test case name from vm-run.sh output.

In other words, no, this change cannot be made unconditionally. If there
is a use case for more human readable output, that could be done with
something like --human-readable option on the command line, but I'm not
really convinced of the use case.. I parallel-py.vm output is what I'd
normally use as the human readable way of following test progress.
Furthermore, if run-tests.py output would need to be more human
readable, I'd expect it to look even better with a single line used for
each test case and not printing the START part separately at all (e.g.,
just print the name of the test case when starting and PASS/FAIL/SKIP
when finishing).

-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux