0

chromeos: Upload Tast results to RDB even when setup fails.

eg: https://chromium-swarm.appspot.com/task?id=54a01da686a6a810 had a
failure during tast setup. This prevented tast results from being
parsed and processed. But we create a fallback JSON file in this
case, and fail to upload these results to RDB. This should fix that so
RDB's results match the tests' JSON results.

Also update the callsite of the rdb_client's Post() to pass in a None
for 'test_file', rather than mistakenly passing 'artifacts' in its
position.

Bug: 1135718
Change-Id: Ic142c6c4c9ea5864465faffef8082a1d59e87cd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3016901
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#900114}
This commit is contained in:
Ben Pastene
2021-07-09 20:00:51 +00:00
committed by Chromium LUCI CQ
parent 1b8b04abd3
commit dae9c7ed57

@ -241,6 +241,8 @@ class RemoteTest(object):
run_results.AddResult(suite_result)
with open(self._test_launcher_summary_output, 'w') as f:
json.dump(json_results.GenerateResultsDict([run_results]), f)
if self._rdb_client:
self._rdb_client.Post(self.suite_name, result, None, None, None)
@staticmethod
def get_artifacts(path):
@ -452,8 +454,13 @@ class TastTest(RemoteTest):
# inside as an RDB 'artifact'. (This could include system logs, screen
# shots, etc.)
artifacts = self.get_artifacts(test['outDir'])
self._rdb_client.Post(test['name'], result, duration_ms, error_log,
artifacts)
self._rdb_client.Post(
test['name'],
result,
duration_ms,
error_log,
None,
artifacts=artifacts)
if self._rdb_client and self._logs_dir:
# Attach artifacts from the device that don't apply to a single test.