summaryrefslogtreecommitdiff
path: root/poky/scripts/lib/resulttool/report.py
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2020-04-13 21:39:40 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-05-05 16:30:44 +0300
commit82c905dc58a36aeae40b1b273a12f63fb1973cf4 (patch)
tree38caf00263451b5036435cdc36e035b25d32e623 /poky/scripts/lib/resulttool/report.py
parent83ecb75644b3d677c274188f9ac0b2374d6f6925 (diff)
downloadopenbmc-82c905dc58a36aeae40b1b273a12f63fb1973cf4.tar.xz
meta-openembedded and poky: subtree updates
Squash of the following due to dependencies among them and OpenBMC changes: meta-openembedded: subtree update:d0748372d2..9201611135 meta-openembedded: subtree update:9201611135..17fd382f34 poky: subtree update:9052e5b32a..2e11d97b6c poky: subtree update:2e11d97b6c..a8544811d7 The change log was too large for the jenkins plugin to handle therefore it has been removed. Here is the first and last commit of each subtree: meta-openembedded:d0748372d2 cppzmq: bump to version 4.6.0 meta-openembedded:17fd382f34 mpv: Remove X11 dependency poky:9052e5b32a package_ipk: Remove pointless comment to trigger rebuild poky:a8544811d7 pbzip2: Fix license warning Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'poky/scripts/lib/resulttool/report.py')
-rw-r--r--poky/scripts/lib/resulttool/report.py33
1 files changed, 28 insertions, 5 deletions
diff --git a/poky/scripts/lib/resulttool/report.py b/poky/scripts/lib/resulttool/report.py
index 692dd7a851..7ceceac802 100644
--- a/poky/scripts/lib/resulttool/report.py
+++ b/poky/scripts/lib/resulttool/report.py
@@ -212,7 +212,21 @@ class ResultsTextReport(object):
maxlen=maxlen)
print(output)
- def view_test_report(self, logger, source_dir, branch, commit, tag, use_regression_map, raw_test):
+ def view_test_report(self, logger, source_dir, branch, commit, tag, use_regression_map, raw_test, selected_test_case_only):
+ def print_selected_testcase_result(testresults, selected_test_case_only):
+ for testsuite in testresults:
+ for resultid in testresults[testsuite]:
+ result = testresults[testsuite][resultid]['result']
+ test_case_result = result.get(selected_test_case_only, {})
+ if test_case_result.get('status'):
+ print('Found selected test case result for %s from %s' % (selected_test_case_only,
+ resultid))
+ print(test_case_result['status'])
+ else:
+ print('Could not find selected test case result for %s from %s' % (selected_test_case_only,
+ resultid))
+ if test_case_result.get('log'):
+ print(test_case_result['log'])
test_count_reports = []
configmap = resultutils.store_map
if use_regression_map:
@@ -235,12 +249,18 @@ class ResultsTextReport(object):
for testsuite in testresults:
result = testresults[testsuite].get(raw_test, {})
if result:
- raw_results[testsuite] = result
+ raw_results[testsuite] = {raw_test: result}
if raw_results:
- print(json.dumps(raw_results, sort_keys=True, indent=4))
+ if selected_test_case_only:
+ print_selected_testcase_result(raw_results, selected_test_case_only)
+ else:
+ print(json.dumps(raw_results, sort_keys=True, indent=4))
else:
print('Could not find raw test result for %s' % raw_test)
return 0
+ if selected_test_case_only:
+ print_selected_testcase_result(testresults, selected_test_case_only)
+ return 0
for testsuite in testresults:
for resultid in testresults[testsuite]:
skip = False
@@ -268,7 +288,7 @@ class ResultsTextReport(object):
def report(args, logger):
report = ResultsTextReport()
report.view_test_report(logger, args.source_dir, args.branch, args.commit, args.tag, args.use_regression_map,
- args.raw_test_only)
+ args.raw_test_only, args.selected_test_case_only)
return 0
def register_commands(subparsers):
@@ -287,4 +307,7 @@ def register_commands(subparsers):
help='instead of the default "store_map", use the "regression_map" for report')
parser_build.add_argument('-r', '--raw_test_only', default='',
help='output raw test result only for the user provided test result id')
-
+ parser_build.add_argument('-s', '--selected_test_case_only', default='',
+ help='output selected test case result for the user provided test case id, if both test '
+ 'result id and test case id are provided then output the selected test case result '
+ 'from the provided test result id')