Commit d643b34b authored by Maksym Onufriienko's avatar Maksym Onufriienko Committed by Commit Bot

[ios_runner]Added status for flaky tests

Example of full_results.json
"HistoryUITestCase/testSwipeDownDismissWhileSearching":
{"expected": "PASS", "is_flaky": true, "actual": "FAIL PASS"}
https://isolateserver.appspot.com/browse?namespace=default-gzip&digest=b152f5f5e3202ee123f81c8b7d912a850cc1ec48&as=full_results.json

Bug: 1032141
Change-Id: I24e7401d5f3a4e3a196dfbadcbd9953bfab39484
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2013759
Commit-Queue: Maksym Onufriienko <monufriienko@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734719}
parent a97f3d60
......@@ -620,10 +620,32 @@ class SimulatorParallelTestRunner(test_runner.SimulatorTestRunner):
'PASS': len(self.logs['passed tests']),
}
self.test_results['tests'] = collections.OrderedDict()
for test in self.logs['passed tests']:
self.test_results['tests'][test] = {'expected': 'PASS', 'actual': 'PASS'}
for test in self.logs['failed tests'] + self.logs['aborted tests']:
self.test_results['tests'][test] = {'expected': 'PASS', 'actual': 'FAIL'}
for shard_attempts in attempts_results:
for attempt, attempt_results in enumerate(shard_attempts):
for test in attempt_results['failed'].keys() + self.logs[
'aborted tests']:
if attempt == len(shard_attempts) - 1:
test_result = 'FAIL'
else:
test_result = self.test_results['tests'].get(test, {}).get(
'actual', '') + ' FAIL'
self.test_results['tests'][test] = {
'expected': 'PASS',
'actual': test_result.strip()
}
for test in attempt_results['passed']:
test_result = self.test_results['tests'].get(test, {}).get(
'actual', '') + ' PASS'
self.test_results['tests'][test] = {
'expected': 'PASS',
'actual': test_result.strip()
}
if 'FAIL' in test_result:
self.test_results['tests'][test]['is_flaky'] = True
# Test is failed if there are failures for the last run.
return not self.logs['failed tests']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment