autotest: Identify special tasks in suite report.
BUG=chromium:641093
TEST=dump_suite_report.py
Change-Id: Ifa70e24c88111431643fa039e95222a323638193
Reviewed-on: https://chromium-review.googlesource.com/446579
Commit-Ready: David Riley <davidriley@chromium.org>
Tested-by: David Riley <davidriley@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
diff --git a/server/lib/status_history.py b/server/lib/status_history.py
index 0b26d2e..3ce921d 100755
--- a/server/lib/status_history.py
+++ b/server/lib/status_history.py
@@ -99,6 +99,7 @@
@property job_status Short string describing the event's final status.
@property job_url URL to the logs for the event's job.
@property diagnosis Working status of the DUT after the event.
+ @property is_special Boolean indicating if the event is a special task.
"""
@@ -180,6 +181,12 @@
raise NotImplemented()
+ @property
+ def is_special(self):
+ """Return if the event is for a special task."""
+ raise NotImplemented()
+
+
class _SpecialTaskEvent(_JobEvent):
"""`_JobEvent` adapter for special tasks.
@@ -281,6 +288,11 @@
return UNKNOWN
+ @property
+ def is_special(self):
+ return True
+
+
class _TestJobEvent(_JobEvent):
"""`_JobEvent` adapter for regular test jobs.
@@ -349,6 +361,11 @@
return UNKNOWN
+ @property
+ def is_special(self):
+ return False
+
+
class HostJobHistory(object):
"""Class to query and remember DUT execution and status history.