aboutsummaryrefslogtreecommitdiff
path: root/lava_dispatcher/actions/test
diff options
context:
space:
mode:
authorRémi Duraffort <remi.duraffort@linaro.org>2018-06-21 17:21:49 +0200
committerRémi Duraffort <remi.duraffort@linaro.org>2018-07-11 12:40:05 +0200
commit0679aa42631577e37542b283fc269b8b8dd5fca0 (patch)
treee1a481b0e6f42a73cd5514ea6717dfbd1e0fa400 /lava_dispatcher/actions/test
parente9367c747f5d9271b274a6dc18b538e722953d3b (diff)
LAVA-1338 Handle STARTTC, ENDTC and TESTCASE
Send to lava-logs a specific message to mark the start and end of the test case --shell or the creation of a result directly using --result or via patterns. Store the corresponding log line in the TestCase. Add documentation on the limitations of this support. Change-Id: I63c1efd9c23cd8b718b8b235fe19f39a214020be
Diffstat (limited to 'lava_dispatcher/actions/test')
-rw-r--r--lava_dispatcher/actions/test/shell.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/lava_dispatcher/actions/test/shell.py b/lava_dispatcher/actions/test/shell.py
index 38a5848dd..0a787907b 100644
--- a/lava_dispatcher/actions/test/shell.py
+++ b/lava_dispatcher/actions/test/shell.py
@@ -502,6 +502,9 @@ class TestShellAction(TestAction):
if res:
# disallow whitespace in test_case_id
test_case_id = "%s" % res['test_case_id'].replace('/', '_')
+ self.logger.marker(
+ {"case": res["test_case_id"],
+ "type": "test_case"})
if ' ' in test_case_id.strip():
self.logger.debug("Skipping invalid test_case_id '%s'", test_case_id.strip())
return True
@@ -555,7 +558,16 @@ class TestShellAction(TestAction):
self.signal_start_run(params)
elif name == "ENDRUN":
self.signal_end_run(params)
+ elif name == "STARTTC":
+ self.logger.marker({"case": params[0],
+ "type": "start_test_case"})
+ elif name == "ENDTC":
+ self.logger.marker({"case": params[0],
+ "type": "end_test_case"})
elif name == "TESTCASE":
+ self.logger.marker(
+ {"case": params[0].replace('TEST_CASE_ID=', ''),
+ "type": "test_case"})
self.signal_test_case(params)
elif name == "TESTFEEDBACK":
self.signal_test_feedback(params)