Bug 9534 - oe-selftest --list-tests output format assumes 150 character wide terminal
Summary: oe-selftest --list-tests output format assumes 150 character wide terminal
Status: VERIFIED FIXED
Alias: None
Product: Build Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2 M1
Assignee: Humberto Ibarra
QA Contact: Jose Perez C
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-04-27 20:47 UTC by Benjamin Esquivel
Modified: 2016-05-19 18:37 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Output with patch applied (132.42 KB, image/png)
2016-05-18 16:20 UTC, Humberto Ibarra
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Esquivel 2016-04-27 20:47:33 UTC
Test listing default output format should conform to the default 80 chars when opening a terminal window. Instead, it assumes you have 150 chars wide.

the suggestion is to get rid of the blank spaces either just by elimination or by changing the way the table is presented to try to avoid automatic carriage returns that mess with the information presented.
Comment 1 Humberto Ibarra 2016-05-14 19:53:50 UTC
I have gone through this and at this point is just impossible to conform to 80 chars and still show all the information for each testcase. There are some groups of testcase-class-module that even without spaces extend well beyond 80 chars.

The first thing to bring up with this is that the current convention on the naming of these testcases is bad. Some cases have insanely long names and more confusing than clarifying. Not sure what can be done to rename the testcases at this point put it needs to be discussed at least.

I will look into this and work to give a partial solution to this bug in the meanwhile.

I'm thinking on grouping testname-class-module attributes in a single column in the form : Module.Class.Tetsname (which is the way in which testcases are run anyways). This will save some space and still be clear enough. It won't make them fit in 80 chars at the moment but when a fix to the names is done the table will look a lot better.
Comment 2 Leonardo Sandoval Gonzalez 2016-05-16 13:41:03 UTC
Some ideas regarding this area:

When formating output, it is good to think how this output will be used. Also, you can also think of another argument (yet another argument to the many already there) which indicate which columns to show, and by default, just show the most important ones (I am not sure which are those), thus line's width is not as big as the current ones.
Comment 3 Benjamin Esquivel 2016-05-17 15:18:38 UTC
Humberto, The purpose of this bug is not to make every line fit in less than 80 chars.

There are things under our control and we should make those things to NOT assume full screen windowed terminals. That ribbon and the headers should not overflow of 80 chars. That thing you mention about getting rid of a lot of spacing by listing tests in the form of: <module>.<class>.<testname> is one good way of not using so much tabs/spaces by replacing them with a dot and reducing columns.

Let's focus on the format for now and later we'll get on the test naming issues/proposals.
Comment 5 Benjamin Esquivel 2016-05-17 20:42:09 UTC
Nice, patch looks good. Can you attach a sample output of the --list-tests with the proposed code?
Comment 6 Humberto Ibarra 2016-05-18 16:19:35 UTC
Sent a v2 patch. Only a minor modification from previous patch, decreased spacing for last column even further and the output turned out better.

Will add required screenshot shortly.

http://lists.openembedded.org/pipermail/openembedded-core/2016-May/121695.html
Comment 7 Humberto Ibarra 2016-05-18 16:20:26 UTC
Created attachment 3181 [details]
Output with patch applied
Comment 8 Benjamin Esquivel 2016-05-18 18:53:31 UTC
That screenshot looks much better than what we currently have. I would say that this solution is acceptable. Is this working good with the search 

I would still create a bug for following up on a couple of nice things to do:

With regards to formatting:
1. being able to sort by column
2. default output of 1 column being test_name and have the option to add columns to the output (id, tags, etc)

With regards to test naming:
3. agree on a test naming convention and fix test names that are either too vague or too long.
Comment 10 Jose Perez C 2016-05-19 18:37:37 UTC
Verified on master, is working as expected.  

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=ce2dd24cedfa19f64b04c6b6e640918ab8c3de8b