summaryrefslogtreecommitdiff
path: root/poky/scripts/lib/resulttool
diff options
context:
space:
mode:
Diffstat (limited to 'poky/scripts/lib/resulttool')
-rw-r--r--poky/scripts/lib/resulttool/log.py33
-rw-r--r--poky/scripts/lib/resulttool/report.py6
2 files changed, 33 insertions, 6 deletions
diff --git a/poky/scripts/lib/resulttool/log.py b/poky/scripts/lib/resulttool/log.py
index 25c339671..2352c767d 100644
--- a/poky/scripts/lib/resulttool/log.py
+++ b/poky/scripts/lib/resulttool/log.py
@@ -16,6 +16,16 @@ def show_ptest(result, ptest, logger):
print("ptest '%s' not found" % ptest)
return 1
+def show_reproducible(result, reproducible, logger):
+ try:
+ print(result['reproducible'][reproducible]['diffoscope.text'])
+ return 0
+
+ except KeyError:
+ print("reproducible '%s' not found" % reproducible)
+ return 1
+
+
def log(args, logger):
results = resultutils.load_resultsdata(args.source)
@@ -40,17 +50,28 @@ def log(args, logger):
with open(dest, 'w') as f:
f.write(ptest['log'])
- if args.raw:
+ if args.raw_ptest:
if 'ptestresult.rawlogs' in r:
print(r['ptestresult.rawlogs']['log'])
else:
- print('Raw logs not found')
+ print('Raw ptest logs not found')
+ return 1
+
+ if args.raw_reproducible:
+ if 'reproducible.rawlogs' in r:
+ print(r['reproducible.rawlogs']['log'])
+ else:
+ print('Raw reproducible logs not found')
return 1
for ptest in args.ptest:
if not show_ptest(r, ptest, logger):
return 1
+ for reproducible in args.reproducible:
+ if not show_reproducible(r, reproducible, logger):
+ return 1
+
def register_commands(subparsers):
"""Register subcommands from this plugin"""
parser = subparsers.add_parser('log', help='show logs',
@@ -63,9 +84,15 @@ def register_commands(subparsers):
help='show logs for a ptest')
parser.add_argument('--dump-ptest', metavar='DIR',
help='Dump all ptest log files to the specified directory.')
+ parser.add_argument('--reproducible', action='append', default=[],
+ help='show logs for a reproducible test')
parser.add_argument('--prepend-run', action='store_true',
help='''Dump ptest results to a subdirectory named after the test run when using --dump-ptest.
Required if more than one test run is present in the result file''')
parser.add_argument('--raw', action='store_true',
- help='show raw logs')
+ help='show raw (ptest) logs. Deprecated. Alias for "--raw-ptest"', dest='raw_ptest')
+ parser.add_argument('--raw-ptest', action='store_true',
+ help='show raw ptest log')
+ parser.add_argument('--raw-reproducible', action='store_true',
+ help='show raw reproducible build logs')
diff --git a/poky/scripts/lib/resulttool/report.py b/poky/scripts/lib/resulttool/report.py
index f706280aa..8b03717d2 100644
--- a/poky/scripts/lib/resulttool/report.py
+++ b/poky/scripts/lib/resulttool/report.py
@@ -19,9 +19,9 @@ class ResultsTextReport(object):
self.ptests = {}
self.ltptests = {}
self.ltpposixtests = {}
- self.result_types = {'passed': ['PASSED', 'passed'],
- 'failed': ['FAILED', 'failed', 'ERROR', 'error', 'UNKNOWN'],
- 'skipped': ['SKIPPED', 'skipped']}
+ self.result_types = {'passed': ['PASSED', 'passed', 'PASS', 'XFAIL'],
+ 'failed': ['FAILED', 'failed', 'FAIL', 'ERROR', 'error', 'UNKNOWN', 'XPASS'],
+ 'skipped': ['SKIPPED', 'skipped', 'UNSUPPORTED', 'UNTESTED', 'UNRESOLVED']}
def handle_ptest_result(self, k, status, result, machine):