summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Williams <neil.williams@linaro.org>2016-08-25 09:19:35 (GMT)
committerNeil Williams <neil.williams@linaro.org>2016-08-25 09:22:05 (GMT)
commit88e6dfeb41967ce934e5940b0add77fa69a5e25a (patch)
tree95aa0d4f8827acde7e6a1abe81207454151350f3
parent355a3d7b2dd03fa1c9b68128be1504f95dc993ad (diff)
downloadlava-dispatcher-88e6dfeb41967ce934e5940b0add77fa69a5e25a.tar.gz
lava-dispatcher-88e6dfeb41967ce934e5940b0add77fa69a5e25a.tar.xz
Handle errors if the testrun start is omitted.
Bugs in test definitions could cause the STARTRUN message to be missed, so ENDRUN then has no self.start time object for reference. Avoid adding an exception on top of the existing problem. Closes: #2488 Change-Id: If462ccfa13cd3da52f3befe349a13b8c53b0e1da
-rw-r--r--lava_dispatcher/pipeline/actions/test/shell.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lava_dispatcher/pipeline/actions/test/shell.py b/lava_dispatcher/pipeline/actions/test/shell.py
index 9506ab9..cbf1d40 100644
--- a/lava_dispatcher/pipeline/actions/test/shell.py
+++ b/lava_dispatcher/pipeline/actions/test/shell.py
@@ -327,6 +327,9 @@ class TestShellAction(TestAction):
uuid = params[1]
# remove the pattern for this run from pattern_dict
self._reset_patterns()
+ # catch error in ENDRUN being handled without STARTRUN
+ if not self.start:
+ self.start = time.time()
self.logger.info("Ending use of test pattern.")
self.logger.info("Ending test lava.%s (%s), duration %.02f",
self.definition, uuid,