| Index: typ/json_results.py
|
| diff --git a/typ/json_results.py b/typ/json_results.py
|
| index 807c7548aca3eab23e17333b4a1deaca06ff0857..b8500bf4d8cfd88e202c48dd3c22431aeab26d2b 100644
|
| --- a/typ/json_results.py
|
| +++ b/typ/json_results.py
|
| @@ -91,12 +91,11 @@ def make_full_results(metadata, seconds_since_epoch, all_test_names, results):
|
|
|
| for test_name in all_test_names:
|
| value = OrderedDict()
|
| + value['actual'] = _actual_results_for_test(test_name, results)
|
| if test_name in skipped_tests:
|
| value['expected'] = 'SKIP'
|
| - value['actual'] = 'SKIP'
|
| else:
|
| value['expected'] = 'PASS'
|
| - value['actual'] = _actual_results_for_test(test_name, results)
|
| if value['actual'].endswith('FAIL'):
|
| value['is_unexpected'] = True
|
| _add_path_to_trie(full_results['tests'], test_name, value)
|
| @@ -127,7 +126,13 @@ def failed_test_names(results):
|
| for r in results.results:
|
| if r.actual == ResultType.Failure:
|
| names.add(r.name)
|
| - elif r.actual == ResultType.Pass and r.name in names:
|
| + elif ((r.actual == ResultType.Pass or r.actual == ResultType.Skip)
|
| + and r.name in names):
|
| + # This check indicates that a test failed, and then either passed
|
| + # or was skipped on a retry. It is somewhat counterintuitive
|
| + # that a test that failed and then skipped wouldn't be considered
|
| + # failed, but that's at least consistent with a test that is
|
| + # skipped every time.
|
| names.remove(r.name)
|
| return names
|
|
|
| @@ -144,8 +149,10 @@ def _actual_results_for_test(test_name, results):
|
| actuals.append('FAIL')
|
| elif r.actual == ResultType.Pass:
|
| actuals.append('PASS')
|
| -
|
| - assert actuals, 'We did not find any result data for %s.' % test_name
|
| + elif r.actual == ResultType.Skip:
|
| + actuals.append('SKIP')
|
| + if not actuals:
|
| + actuals.append('SKIP')
|
| return ' '.join(actuals)
|
|
|
|
|
|
|