diff options
Diffstat (limited to 'cts/meta/th.c')
-rw-r--r-- | cts/meta/th.c | 47 |
1 files changed, 10 insertions, 37 deletions
diff --git a/cts/meta/th.c b/cts/meta/th.c index c1331ff2a7..8564377b7f 100644 --- a/cts/meta/th.c +++ b/cts/meta/th.c @@ -4,60 +4,49 @@ */ #include "common.h" -#include "uart.h" +#include "cts_common.h" +#include "task.h" #include "timer.h" +#include "uart.h" #include "watchdog.h" -#include "dut_common.h" -#include "cts_common.h" - -enum cts_rc debug_test(void) -{ - CTS_DEBUG_PRINTF("You should see #'s 1-4 on sequential lines:"); - CTS_DEBUG_PRINTF("1"); - CTS_DEBUG_PRINTF("2\n3"); - CTS_DEBUG_PRINTF("4"); - return CTS_RC_SUCCESS; -} enum cts_rc success_test(void) { - CTS_DEBUG_PRINTF("Expect: Success"); return CTS_RC_SUCCESS; } enum cts_rc fail_dut_test(void) { - CTS_DEBUG_PRINTF("Expect: Failure"); return CTS_RC_SUCCESS; } enum cts_rc fail_th_test(void) { - CTS_DEBUG_PRINTF("Expect: Failure"); return CTS_RC_FAILURE; } enum cts_rc fail_both_test(void) { - CTS_DEBUG_PRINTF("Expect: Failure"); return CTS_RC_FAILURE; } enum cts_rc bad_sync_and_success_test(void) { - CTS_DEBUG_PRINTF("Expect: Bad Sync"); return CTS_RC_BAD_SYNC; } enum cts_rc bad_sync_both_test(void) { - CTS_DEBUG_PRINTF("Expect: Bad Sync"); return CTS_RC_BAD_SYNC; } enum cts_rc hang_test(void) { - CTS_DEBUG_PRINTF("This and next, expect: Corrupted"); + return CTS_RC_SUCCESS; +} + +enum cts_rc did_not_start_test(void) +{ return CTS_RC_SUCCESS; } @@ -65,22 +54,6 @@ enum cts_rc hang_test(void) void cts_task(void) { - enum cts_rc result; - int i; - - cflush(); - for (i = 0; i < CTS_TEST_ID_COUNT; i++) { - sync(); - CPRINTF("\n%s start\n", tests[i].name); - result = tests[i].run(); - CPRINTF("\n%s end %d\n", tests[i].name, result); - cflush(); - } - - CPRINTS("Meta test finished"); - cflush(); - while (1) { - watchdog_reload(); - sleep(1); - } + cts_main_loop(tests, "Meta"); + task_wait_event(-1); } |