diff options
author | Aníbal Limón <anibal.limon@linaro.org> | 2019-03-20 13:00:57 -0600 |
---|---|---|
committer | Chase Qi <chase.qi@linaro.org> | 2019-03-26 09:37:20 +0800 |
commit | 9b6adde3e394da438df6382072a921dfdece4dc8 (patch) | |
tree | b876db5baff9d38bc93dc6585194fe32e27a6d72 | |
parent | 36d72fbdf5bbdecb8b4107beddf2d97c7f0952fd (diff) |
automated/linux/piglit: Add support to use lava-test-set
The lava-test-set provides better reporting previously the results were
reported as:
spec@arb_arrays_of_arrays@linker@vs-to-fs-unsized pass|fail|skip
In this implementation the last function is reported as test case and
the previous ones as test suite,
lava-test-set start spec@arb_arrays_of_arrays@linker@
...
vs-to-fs-unsized pass|fail|skip
...
lava-test-set stop spec@arb_arrays_of_arrays@linker@
Change-Id: Id776646d65282f060985b3bd707f11376bf4b085
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
-rwxr-xr-x | automated/linux/piglit/piglit_lava_parse.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/automated/linux/piglit/piglit_lava_parse.py b/automated/linux/piglit/piglit_lava_parse.py index cb20657..32e8e2a 100755 --- a/automated/linux/piglit/piglit_lava_parse.py +++ b/automated/linux/piglit/piglit_lava_parse.py @@ -47,13 +47,26 @@ def natural_keys(text): def print_results(filename, ignore_tests): + currentsuite = '' with open(filename, 'r') as f: piglit_results = json.loads(f.read()) for test in sorted(piglit_results['tests'].keys()): if test in ignore_tests: continue + testname_parts = test.split('@') + testname = testname_parts[-1].replace(' ', '_') + suitename = '@'.join(testname_parts[0:-1]) + + if currentsuite != suitename: + if currentsuite: + print('lava-test-set stop %s' % currentsuite) + + currentsuite = suitename + print('lava-test-set start %s' % currentsuite) + result = map_result_to_lava(piglit_results['tests'][test]['result']) - print("%s %s" % (test, result)) + print("%s %s" % (testname, result)) + print('lava-test-set stop %s' % currentsuite) if __name__ == '__main__': |