Commit Graph

15 Commits

Author SHA1 Message Date
Robert Yang
15cdacb8c0 oeqa: Cleanup /usr/bin/env python
(From OE-Core rev: eb79217b8761816a21c8f7bed3c5379c1b9230ea)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-30 22:40:52 +01:00
Ross Burton
85075b80d6 oeqa/logparser: ignore test failure commentary
The output format for Python and GLib both can be of this form:

FAIL: foobar (Segmentation fault)

In this case the test is called foobar not foobar_segmentation_fault.

(From OE-Core rev: 0219e9bd0273661b4b70df97e5762f77b3ac3e8c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-20 13:14:21 +01:00
Richard Purdie
ffae400179 meta/lib+scripts: Convert to SPDX license headers
This adds SPDX license headers in place of the wide assortment of things
currently in our script headers. We default to GPL-2.0-only except for the
oeqa code where it was clearly submitted and marked as MIT on the most part
or some scripts which had the "or later" GPL versioning.

The patch also drops other obsolete bits of file headers where they were
encoountered such as editor modelines, obsolete maintainer information or
the phrase "All rights reserved" which is now obsolete and not required in
copyright headers (in this case its actually confusing for licensing as all
rights were not reserved).

More work is needed for OE-Core but this takes care of the bulk of the scripts
and meta/lib directories.

The top level LICENSE files are tweaked to match the new structure and the
SPDX naming.

(From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09 16:31:55 +01:00
Armin Kuster
65b50feabe logparser: Add LTP compliance section
(From OE-Core rev: 0e02eee4041828608bd64610538551646160fd5e)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-29 14:16:30 +01:00
Armin Kuster
9640fa3b22 logparser: Add decoding ltp logs
(From OE-Core rev: 9be041fbaab71a40a2a7422221d8bd5637d6655c)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-29 14:16:30 +01:00
Richard Purdie
7b17274c30 oeqa/logparser: Various misc cleanups
Get rid of further unneeded code complications:

* value mappings we could just direct use
* ftools when we can write files easily ourself
* test result status filtering we don't use
* variable overwriting module imports

(From OE-Core rev: d6065f136f6d353c3054cc3f440a4e259509f876)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-31 23:23:26 +00:00
Richard Purdie
54d4694f32 oeqa/logparser: Improve results handling
Merge the results handling into the ptest log parser as a seperate
method.

Drop the weird "pass.skip.fail." prefix to the results filename, its
just bizarre.

Drop the code turning a list into a regex then searching the regex for
an item, "x in y" is perfectly capable.

Use a dict, sort the keys as needed and drop the list sorting code.

(From OE-Core rev: f317800e950b4a37b4034133bc52e0c47f04dc29)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-31 23:23:26 +00:00
Richard Purdie
3731033435 oeqa/utils/logparser: Add in support for duration, exitcode and logs by section
Allow parsing of the ptest duration, exit code and timeout keywords
from the logs, returning data on each section.

Also include the logs broken out per section.

(From OE-Core rev: a9a67dccaa5be0f06eedcab46dcff7cbf9202850)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-31 23:23:26 +00:00
Richard Purdie
88f390bcb6 oeqa/logparser: Reform the ptest results parser
Now we have a dedicated ptest parser, merge in the remaining ptest
specific pieces to further clarify and simplify the code, moving to
a point where we can consider extending/enhancing it.

(From OE-Core rev: 05991bb5bc8018275d03fdeecee3d5a757840c7c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-31 23:23:26 +00:00
Richard Purdie
4ee85b1cd6 oeqa/logparser: Further simplification/clarification
Rename the paster to be ptest specific and apply some further cleanups
to the code to simplify and clarify what its doing.

(From OE-Core rev: 45a5886f1ec458d4c306b8d68fd31d568bc36b47)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-31 23:23:26 +00:00
Richard Purdie
95427c47ab oeqa/utils/logparser: Simplify ptest log parsing code
logparser is only used by ptest. Its slightly overcomplicated as it was
intended to be reusable but wasn't. Simplify it as a dedicated parser is
likely to me more readable and maintainable.

(From OE-Core rev: c7478345b2b4a85cb1fec40e762633871f0e94cb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-31 23:23:26 +00:00
Robert Yang
f4d4bfd2b7 utils/logparser.py: fix section check
The section might be None or '', so use "if section" for it.

Fixed:
File "/buildarea/lyang1/poky/meta/lib/oeqa/utils/logparser.py", line 113, in log_as_files
    prefix += section
TypeError: Can't convert 'NoneType' object to str implicitly

[YOCTO #11547]

(From OE-Core rev: 320ea01f9eb33df462534bf08488ff6ada9bbe7b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-23 14:16:01 +01:00
Robert Yang
f1c8488084 oeqa/utils/logparser.py: add skip status
Some test cases maybe skipped, let's parse it.

[YOCTO #11547]

(From OE-Core rev: f23c0f6a5aa93d38a5ea9d450f0accff0a5cc869)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-23 14:16:01 +01:00
Richard Purdie
3b39971748 classes/lib: Complete transition to python3
This patch contains all the other misc pieces of the transition to
python3 which didn't make sense to be broken into individual patches.

(From OE-Core rev: fcd6b38bab8517d83e1ed48eef1bca9a9a190f57)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:01 +01:00
Lucian Musat
0a39472d19 oeqa/utils/logparser.py: results based log parser utility
A module for parsing results based logs like ptest, compliance and performance.
Supports breaking the logs into multiple sections and also provides a result object to use the parser with.
The parser is initialized with the regex required to identify results and section statements in the target log file.

(From OE-Core rev: 72308d030fc98982e88b121b052cd2438f6b031c)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Lucian Musat <georgex.l.musat@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10 15:38:56 +01:00