[autotest] generate a suite timing report when parsing a suite job
Teach the tko/parse.py to generate a suite timing report when it is
parsing the suite result.
BUG=chromium:641093
TEST=unittest
2. trybot
3. copy all the code to a testing server, and run
$./tko/parse.py -l -2 -r --suite-report -o
/usr/local/autotest/results/24-chromeos-test/ to generate the event.log
report.
4. Run dummy suite with the trybot image in a test server. Event.log is
correctly generated under results/ folder
Change-Id: Ie36e51167c42f1d2c62c523b4989c6daf69842fd
Reviewed-on: https://chromium-review.googlesource.com/417881
Commit-Ready: Shuqian Zhao <shuqianz@chromium.org>
Tested-by: Shuqian Zhao <shuqianz@chromium.org>
Reviewed-by: Shuqian Zhao <shuqianz@chromium.org>
diff --git a/tko/db.py b/tko/db.py
index 9da76e7..99f9621 100644
--- a/tko/db.py
+++ b/tko/db.py
@@ -447,6 +447,8 @@
@param job: The job object.
@param parent_job_id: The parent job id.
@param commit: If commit the transaction .
+
+ @return The dict of data inserted into the tko_jobs table.
"""
job.machine_idx = self.lookup_machine(job.machine)
if not job.machine_idx:
@@ -490,6 +492,8 @@
for test in job.tests:
self.insert_test(job, test, commit=commit)
+ return data
+
def update_job_keyvals(self, job, commit=None):
"""Updates the job key values.