aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/python_utils
diff options
context:
space:
mode:
authorGravatar Matt Kwong <mattkwong@google.com>2018-06-29 17:56:42 -0700
committerGravatar Matt Kwong <mattkwong@google.com>2018-06-29 17:56:42 -0700
commit39ab59ff36b2110a6ad6e761301289a1ed54fbd2 (patch)
treedf6655d4c23ce1f33679d70916f83273877a2ebd /tools/run_tests/python_utils
parent7860a9418ba53e23a06db1f42fff4500b66ff80a (diff)
Enable uploading UNKNOWN results for RBE
Diffstat (limited to 'tools/run_tests/python_utils')
-rw-r--r--tools/run_tests/python_utils/upload_rbe_results.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/tools/run_tests/python_utils/upload_rbe_results.py b/tools/run_tests/python_utils/upload_rbe_results.py
index cbeb1ad941..f35869cd4b 100644
--- a/tools/run_tests/python_utils/upload_rbe_results.py
+++ b/tools/run_tests/python_utils/upload_rbe_results.py
@@ -136,7 +136,7 @@ if __name__ == "__main__":
resultstore_actions = _get_resultstore_data(api_key, invocation_id)
bq_rows = []
- for action in resultstore_actions:
+ for index, action in enumerate(resultstore_actions):
# Filter out non-test related data, such as build results.
if 'testAction' not in action:
continue
@@ -157,6 +157,23 @@ if __name__ == "__main__":
'timedOut': True
}
}]
+ # When RBE believes its infrastructure is failing, it will abort and
+ # mark running tests as UNKNOWN. These infrastructure failures may be
+ # related to our tests, so we should investigate if specific tests are
+ # repeatedly being marked as UNKNOWN.
+ elif action['statusAttributes']['status'] == 'UNKNOWN':
+ test_cases = [{
+ 'testCase': {
+ 'caseName': str(action['id']['actionId']),
+ 'unknown': True
+ }
+ }]
+ # Take the timestamp from the previous action, which should be
+ # a close approximation.
+ action['timing'] = {
+ 'startTime':
+ resultstore_actions[index - 1]['timing']['startTime']
+ }
else:
test_cases = action['testAction']['testSuite']['tests'][0][
'testSuite']['tests']
@@ -165,6 +182,8 @@ if __name__ == "__main__":
result = 'FAILED'
elif 'timedOut' in test_case['testCase']:
result = 'TIMEOUT'
+ elif 'unknown' in test_case['testCase']:
+ result = 'UNKNOWN'
else:
result = 'PASSED'
bq_rows.append({