[autotest] Support Autotest parse job to upload results to Sponge
BUG=None
TEST=unittest, functional test
python site_utils/sponge_utils_functional_test.py
Change-Id: I22e240282b28a48556d4b84d2b8c8ababfa8c2e6
Reviewed-on: https://chromium-review.googlesource.com/372979
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
diff --git a/tko/parse.py b/tko/parse.py
index 0ecf248..f3cf2e4 100755
--- a/tko/parse.py
+++ b/tko/parse.py
@@ -11,6 +11,7 @@
from autotest_lib.frontend.tko import models as tko_models
from autotest_lib.server.cros.dynamic_suite import constants
from autotest_lib.site_utils import job_overhead
+from autotest_lib.site_utils import sponge_utils
from autotest_lib.tko import db as tko_db, utils as tko_utils
from autotest_lib.tko import models, status_lib
from autotest_lib.tko.perf_upload import perf_uploader
@@ -319,6 +320,9 @@
db.commit()
+ # Upload job details to Sponge.
+ sponge_utils.upload_results(job)
+
# Mark GS_OFFLOADER_NO_OFFLOAD in gs_offloader_instructions at the end of
# the function, so any failure, e.g., db connection error, will stop
# gs_offloader_instructions being updated, and logs can be uploaded for