Instead of using separate regular expressions to capture the multiple
forms pytest test summaries might take, use one generic regular
expression to match the summary line, and then process comma-separated
components of the line with more specific matches.
Three test cases needed to be updated to accommodate this refactor:
- Two tests omitted the leading '=' characters from the line to match,
even though their summary lines clearly originated from pytest. Fix by
adding some leading '=' characters for those summary lines.
- One test mistakenly counted an "xpass" as an "xfail". Autospec maps
"xpass" results to "pass", so update the test accordingly.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Support the output of `meson test` in addition to `ninja test`, since
the meson docs recommend running `meson test`.
Also add a new unit test to cover some of the test result summary line
differences.
Fixes#323
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This patch takes a different approach, since it was likely that
changing the way we count the existing individual patterns could break
other logs.
So when it identifies this is a meson test, it forks off to just parse
the meson patterns.
It doesn't support the "CLR-XTEST:" prefix to group multiple tests,
mostly because I couldn't find examples of it to test.
This allows python3 unittest to properly generate the tests when running
all the tests in the tests directory.
Also adds a fix to test_test.py to reset buildpattern.default_pattern
every test. This was a bug introduced by running all tests at once -
this was not being cleared correctly.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
Add unit tests for the very large count.py module/script. These unit
tests attempt to test every regular expression present in the parse_log
function and helped catch several bugs in the original regexes ported
from perl.