diff options
Diffstat (limited to 'scripts/resulttool')
| -rwxr-xr-x | scripts/resulttool | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/scripts/resulttool b/scripts/resulttool deleted file mode 100755 index 66a6af9959..0000000000 --- a/scripts/resulttool +++ /dev/null | |||
| @@ -1,83 +0,0 @@ | |||
| 1 | #!/usr/bin/env python3 | ||
| 2 | # | ||
| 3 | # test results tool - tool for manipulating OEQA test result json files | ||
| 4 | # (merge results, summarise results, regression analysis, generate manual test results file) | ||
| 5 | # | ||
| 6 | # To look for help information. | ||
| 7 | # $ resulttool | ||
| 8 | # | ||
| 9 | # To store test results from oeqa automated tests, execute the below | ||
| 10 | # $ resulttool store <source_dir> <git_branch> | ||
| 11 | # | ||
| 12 | # To merge test results, execute the below | ||
| 13 | # $ resulttool merge <base_result_file> <target_result_file> | ||
| 14 | # | ||
| 15 | # To report test report, execute the below | ||
| 16 | # $ resulttool report <source_dir> | ||
| 17 | # | ||
| 18 | # To create a unit test report in JUnit XML format, execute the below | ||
| 19 | # $ resulttool junit <json_file> | ||
| 20 | # | ||
| 21 | # To perform regression file analysis, execute the below | ||
| 22 | # $ resulttool regression-file <base_result_file> <target_result_file> | ||
| 23 | # | ||
| 24 | # To execute manual test cases, execute the below | ||
| 25 | # $ resulttool manualexecution <manualjsonfile> | ||
| 26 | # | ||
| 27 | # By default testresults.json for manualexecution store in <build>/tmp/log/manual/ | ||
| 28 | # | ||
| 29 | # Copyright (c) 2019, Intel Corporation. | ||
| 30 | # | ||
| 31 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 32 | # | ||
| 33 | |||
| 34 | import os | ||
| 35 | import sys | ||
| 36 | import argparse | ||
| 37 | import logging | ||
| 38 | script_path = os.path.dirname(os.path.realpath(__file__)) | ||
| 39 | lib_path = script_path + '/lib' | ||
| 40 | sys.path = sys.path + [lib_path] | ||
| 41 | import argparse_oe | ||
| 42 | import scriptutils | ||
| 43 | import resulttool.merge | ||
| 44 | import resulttool.store | ||
| 45 | import resulttool.regression | ||
| 46 | import resulttool.report | ||
| 47 | import resulttool.manualexecution | ||
| 48 | import resulttool.log | ||
| 49 | import resulttool.junit | ||
| 50 | logger = scriptutils.logger_create('resulttool') | ||
| 51 | |||
| 52 | def main(): | ||
| 53 | parser = argparse_oe.ArgumentParser(description="OEQA test result manipulation tool.", | ||
| 54 | epilog="Use %(prog)s <subcommand> --help to get help on a specific command") | ||
| 55 | parser.add_argument('-d', '--debug', help='enable debug output', action='store_true') | ||
| 56 | parser.add_argument('-q', '--quiet', help='print only errors', action='store_true') | ||
| 57 | subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>') | ||
| 58 | subparsers.required = True | ||
| 59 | subparsers.add_subparser_group('manualexecution', 'manual testcases', 300) | ||
| 60 | resulttool.manualexecution.register_commands(subparsers) | ||
| 61 | subparsers.add_subparser_group('setup', 'setup', 200) | ||
| 62 | resulttool.merge.register_commands(subparsers) | ||
| 63 | resulttool.store.register_commands(subparsers) | ||
| 64 | subparsers.add_subparser_group('analysis', 'analysis', 100) | ||
| 65 | resulttool.regression.register_commands(subparsers) | ||
| 66 | resulttool.report.register_commands(subparsers) | ||
| 67 | resulttool.log.register_commands(subparsers) | ||
| 68 | resulttool.junit.register_commands(subparsers) | ||
| 69 | |||
| 70 | args = parser.parse_args() | ||
| 71 | if args.debug: | ||
| 72 | logger.setLevel(logging.DEBUG) | ||
| 73 | elif args.quiet: | ||
| 74 | logger.setLevel(logging.ERROR) | ||
| 75 | |||
| 76 | try: | ||
| 77 | ret = args.func(args, logger) | ||
| 78 | except argparse_oe.ArgumentUsageError as ae: | ||
| 79 | parser.error_subcommand(ae.message, ae.subcommand) | ||
| 80 | return ret | ||
| 81 | |||
| 82 | if __name__ == "__main__": | ||
| 83 | sys.exit(main()) | ||
