diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-03-26 23:08:25 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-03-26 23:09:42 +0300 |
commit | 40320b10a8431fc579173393e3a648e0c77b210a (patch) | |
tree | 0384086eb80321a26589b9f2851def0815d2a019 /poky/scripts/resulttool | |
parent | 8f73848b2e38df5b454913cf60ec7ed427f92413 (diff) | |
download | openbmc-40320b10a8431fc579173393e3a648e0c77b210a.tar.xz |
poky: refresh thud: e4c0a8a7cb..9dfebdaf7a
Update poky to thud HEAD.
Mazliana (2):
scripts/resulttool: enable manual execution and result creation
resulttool/manualexecution: To output right test case id
Michael Halstead (1):
yocto-uninative: Correct sha256sum for aarch64
Richard Purdie (12):
resulttool: Improvements to allow integration to the autobuilder
resulttool/resultutils: Avoids tracebacks for missing logs
resulttool/store: Handle results files for multiple revisions
resulttool/report: Handle missing metadata sections more cleanly
resulttool/report: Ensure test suites with no results show up on the report
resulttool/report: Ensure ptest results are sorted
resulttool/store: Fix missing variable causing testresult corruption
oeqa/utils/gitarchive: Handle case where parent is only on origin
scripts/wic: Be consistent about how we call bitbake
yocto-uninative: Update to 2.4
poky.conf: Bump version for 2.6.2 thud release
build-appliance-image: Update to thud head revision
Yeoh Ee Peng (4):
resulttool: enable merge, store, report and regression analysis
resulttool/regression: Ensure regressoin results are sorted
scripts/resulttool: Enable manual result store and regression
resulttool/report: Enable roll-up report for a commit
Change-Id: Icf3c93db794539bdd4501d2e7db15c68b6c541ae
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/scripts/resulttool')
-rwxr-xr-x | poky/scripts/resulttool | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/poky/scripts/resulttool b/poky/scripts/resulttool new file mode 100755 index 000000000..5a89e1c9b --- /dev/null +++ b/poky/scripts/resulttool @@ -0,0 +1,93 @@ +#!/usr/bin/env python3 +# +# test results tool - tool for manipulating OEQA test result json files +# (merge results, summarise results, regression analysis, generate manual test results file) +# +# To look for help information. +# $ resulttool +# +# To store test results from oeqa automated tests, execute the below +# $ resulttool store <source_dir> <git_branch> +# +# To merge test results, execute the below +# $ resulttool merge <base_result_file> <target_result_file> +# +# To report test report, execute the below +# $ resulttool report <source_dir> +# +# To perform regression file analysis, execute the below +# $ resulttool regression-file <base_result_file> <target_result_file> +# +# To execute manual test cases, execute the below +# $ resulttool manualexecution <manualjsonfile> +# +# By default testresults.json for manualexecution store in <build>/tmp/log/manual/ +# +# Copyright (c) 2019, Intel Corporation. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. +# +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# + +import os +import sys +import argparse +import logging +script_path = os.path.dirname(os.path.realpath(__file__)) +lib_path = script_path + '/lib' +sys.path = sys.path + [lib_path] +import argparse_oe +import scriptutils +import resulttool.merge +import resulttool.store +import resulttool.regression +import resulttool.report +import resulttool.manualexecution +logger = scriptutils.logger_create('resulttool') + +def _validate_user_input_arguments(args): + if hasattr(args, "source_dir"): + if not os.path.isdir(args.source_dir): + logger.error('source_dir argument need to be a directory : %s' % args.source_dir) + return False + return True + +def main(): + parser = argparse_oe.ArgumentParser(description="OEQA test result manipulation tool.", + epilog="Use %(prog)s <subcommand> --help to get help on a specific command") + parser.add_argument('-d', '--debug', help='enable debug output', action='store_true') + parser.add_argument('-q', '--quiet', help='print only errors', action='store_true') + subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>') + subparsers.required = True + subparsers.add_subparser_group('manualexecution', 'manual testcases', 300) + resulttool.manualexecution.register_commands(subparsers) + subparsers.add_subparser_group('setup', 'setup', 200) + resulttool.merge.register_commands(subparsers) + resulttool.store.register_commands(subparsers) + subparsers.add_subparser_group('analysis', 'analysis', 100) + resulttool.regression.register_commands(subparsers) + resulttool.report.register_commands(subparsers) + + args = parser.parse_args() + if args.debug: + logger.setLevel(logging.DEBUG) + elif args.quiet: + logger.setLevel(logging.ERROR) + + if not _validate_user_input_arguments(args): + return -1 + + try: + ret = args.func(args, logger) + except argparse_oe.ArgumentUsageError as ae: + parser.error_subcommand(ae.message, ae.subcommand) + return ret + +if __name__ == "__main__": + sys.exit(main()) |