diff options
| author | Clara Kowalsky <clara.kowalsky@siemens.com> | 2024-08-28 11:20:27 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-08-29 21:58:19 +0100 |
| commit | 5aeabd3217da2a7ce9f789d5d224f6682b4555a1 (patch) | |
| tree | c81f98c3e1a608ae71917e2f87fd640f70254a67 /scripts/resulttool | |
| parent | f4f9ebf6fb7da7605298c95187a70c118e0ab02e (diff) | |
| download | poky-5aeabd3217da2a7ce9f789d5d224f6682b4555a1.tar.gz | |
resulttool: Add support to create test report in JUnit XML format
This adds the functionality to convert the results of the
testresults.json file to a unit test report in JUnit XML format. The
unit test report can be used in the CI/CD pipeline to display the test
results.
To use the resulttool scripts, first source oe environment, then run the
entry point script to look for help.
$ resulttool
To generate the unit test report, execute the below
$ resulttool junit <json_file>
By default the unit test report is stored as
<build_dir>/tmp/log/oeqa/junit.xml.
(From OE-Core rev: 3f9be03946243feaa09b908d7010899769091fe6)
Signed-off-by: Clara Kowalsky <clara.kowalsky@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/resulttool')
| -rwxr-xr-x | scripts/resulttool | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/resulttool b/scripts/resulttool index fc282bda6c..66a6af9959 100755 --- a/scripts/resulttool +++ b/scripts/resulttool | |||
| @@ -15,6 +15,9 @@ | |||
| 15 | # To report test report, execute the below | 15 | # To report test report, execute the below |
| 16 | # $ resulttool report <source_dir> | 16 | # $ resulttool report <source_dir> |
| 17 | # | 17 | # |
| 18 | # To create a unit test report in JUnit XML format, execute the below | ||
| 19 | # $ resulttool junit <json_file> | ||
| 20 | # | ||
| 18 | # To perform regression file analysis, execute the below | 21 | # To perform regression file analysis, execute the below |
| 19 | # $ resulttool regression-file <base_result_file> <target_result_file> | 22 | # $ resulttool regression-file <base_result_file> <target_result_file> |
| 20 | # | 23 | # |
| @@ -43,6 +46,7 @@ import resulttool.regression | |||
| 43 | import resulttool.report | 46 | import resulttool.report |
| 44 | import resulttool.manualexecution | 47 | import resulttool.manualexecution |
| 45 | import resulttool.log | 48 | import resulttool.log |
| 49 | import resulttool.junit | ||
| 46 | logger = scriptutils.logger_create('resulttool') | 50 | logger = scriptutils.logger_create('resulttool') |
| 47 | 51 | ||
| 48 | def main(): | 52 | def main(): |
| @@ -61,6 +65,7 @@ def main(): | |||
| 61 | resulttool.regression.register_commands(subparsers) | 65 | resulttool.regression.register_commands(subparsers) |
| 62 | resulttool.report.register_commands(subparsers) | 66 | resulttool.report.register_commands(subparsers) |
| 63 | resulttool.log.register_commands(subparsers) | 67 | resulttool.log.register_commands(subparsers) |
| 68 | resulttool.junit.register_commands(subparsers) | ||
| 64 | 69 | ||
| 65 | args = parser.parse_args() | 70 | args = parser.parse_args() |
| 66 | if args.debug: | 71 | if args.debug: |
