tast: Report timestamps for individual errors within tests |
||
Issue description
The tast command writes a results.json file containing an array of TestResult structs. Each of these contains an array of testing.Error structs. testing.Error doesn't contain a timestamp since it's passed from test runners to the tast command via TestError control messages that already contains their own timestamps.
As a result, the Autotest server test that parses results.json files needs to fudge error timestamps when synthesizing errors for TKO status.log files.
I'm going to change the tast command to instead write an object for each error that additionally includes the timestamp from the control message. This should be backward-compatible since these JSON objects aren't typed in any way; it'll look the same object as before but with an additional "time" property:
[
{
"name": "example.Fail",
"errors": [
{
"time": "2018-04-18T18:49:30.974718982-07:00",
"reason": "Here's an error",
<more existing properties>
,
Apr 24 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/c21f4aa52b9d1552f00e150b92255d9984330335 commit c21f4aa52b9d1552f00e150b92255d9984330335 Author: Daniel Erat <derat@chromium.org> Date: Tue Apr 24 07:30:16 2018 autotest: Make tast test use correct error timestamps. Make the tast server test use the error timestamps that the tast command now writes to results.json files when creating status.log events. It previously just used the test end time due to error timestamps not being available. BUG= chromium:834582 TEST=verified that FAIL entries in status.log have correct timestamps Change-Id: I0357f7098d8024c63375e0ab262d0ea0b5ff2e4e Reviewed-on: https://chromium-review.googlesource.com/1024966 Commit-Ready: Dan Erat <derat@chromium.org> Tested-by: Dan Erat <derat@chromium.org> Reviewed-by: Ilja H. Friedel <ihf@chromium.org> [modify] https://crrev.com/c21f4aa52b9d1552f00e150b92255d9984330335/server/site_tests/tast/tast.py
,
Apr 24 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Apr 19 2018