From 5aafb3b61c22fc0ff7edacd008beda775d631d97 Mon Sep 17 00:00:00 2001 From: Matt Kwong Date: Fri, 11 May 2018 15:46:09 -0700 Subject: Handle timeouts when uploading ResultStore results --- tools/run_tests/python_utils/upload_rbe_results.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/run_tests/python_utils/upload_rbe_results.py b/tools/run_tests/python_utils/upload_rbe_results.py index d302024883..5955b3792f 100644 --- a/tools/run_tests/python_utils/upload_rbe_results.py +++ b/tools/run_tests/python_utils/upload_rbe_results.py @@ -146,7 +146,15 @@ if __name__ == "__main__": test_cases = [{ 'testCase': { 'caseName': str(action['id']['actionId']), - 'result': str(action['statusAttributes']['status']) + } + }] + # Test timeouts have a different dictionary structure compared to pass and + # fail results. + elif action['statusAttributes']['status'] == 'TIMED_OUT': + test_cases = [{ + 'testCase': { + 'caseName': str(action['id']['actionId']), + 'timedOut': True } }] else: @@ -155,6 +163,8 @@ if __name__ == "__main__": for test_case in test_cases: if 'errors' in test_case['testCase']: result = 'FAILED' + elif 'timedOut' in test_case['testCase']: + result = 'TIMEOUT' else: result = 'PASSED' bq_rows.append({ -- cgit v1.2.3