summaryrefslogtreecommitdiff
path: root/cts/task
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2017-06-22 14:36:24 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-06-27 15:52:06 -0700
commita82421df00ac1834d0dc8a93f788c323b1bf1977 (patch)
tree3ce0268be0e05e9b53a6afe5565bbf3cf6e8a06d /cts/task
parent4c23fa01df623438e7d2bfe51dec6eac4f7d9ff2 (diff)
downloadchrome-ec-a82421df00ac1834d0dc8a93f788c323b1bf1977.tar.gz
eCTS: Print start marker before sync
This patch makes each test print start marker before sync. This will allow us to distinguish the failure before even sync is attempted (CTS_RC_DID_NOT_START, thus probably caused by the previous test) and the failure caused by the hanging partner, in which case the one good and alive will be stuck in sync (and should return _DID_NOT_END or even better _BAD_SYNC once we implement timeout in sync). This patch also: * Adds did_not_start_test to and removes debug_test from meta suite * Consolidates test runner loops into common cts_main_loop * Removes dut_common.h and th_common.h * Removes debug print macro and CTS_DEBUG * Replaces all infinite loops after tests with task_wait_event(-1) * Removes meaningless comments and debug printfs * Removes CTS_TEST_ID_* * Adds sync() to task suite BUG=chromium:736104 BRANCH=none TEST=Run run_ects.sh and verify all tests pass Change-Id: I6ccdf26afac6b8e8cb16483c5d75e4e77e7962f4 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/545176
Diffstat (limited to 'cts/task')
-rw-r--r--cts/task/dut.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/cts/task/dut.c b/cts/task/dut.c
index 4cc6e3e4a4..0ca39df926 100644
--- a/cts/task/dut.c
+++ b/cts/task/dut.c
@@ -13,7 +13,7 @@
static int repeat_count;
static int wake_count[3];
-void clear_state(void)
+void clean_state(void)
{
wake_count[0] = wake_count[1] = wake_count[2] = 0;
}
@@ -135,22 +135,7 @@ enum cts_rc test_stack_overflow(void)
void cts_task(void)
{
- enum cts_rc rc;
- int i;
-
task_wake(TASK_ID_TICK);
-
- for (i = 0; i < CTS_TEST_ID_COUNT; i++) {
- clear_state();
- CPRINTF("\n%s start\n", tests[i].name);
- rc = tests[i].run();
- CPRINTF("\n%s end %d\n", tests[i].name, rc);
- cflush();
- }
-
- CPRINTS("Task test suite finished");
- cflush();
-
- /* Sleep forever */
+ cts_main_loop(tests, "Task");
task_wait_event(-1);
}