diff options
author | Vic Yang <victoryang@chromium.org> | 2013-07-23 01:58:49 +0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-07-22 16:09:47 -0700 |
commit | 8218aa1346e533423d445018a289f938f36bcebd (patch) | |
tree | 4ad96173a6f980034bc842e670f6ee87df59aed9 /include/test_util.h | |
parent | 2d205f97cbfd7eecf9d6cf6b9a44c4f667e9be79 (diff) | |
download | chrome-ec-8218aa1346e533423d445018a289f938f36bcebd.tar.gz |
Add system_common unit test
This tests reboot-on-ap-shutdown.
BUG=chrome-os-partner:19236
TEST=Pass the test
BRANCH=None
Change-Id: Ic1a07670f82646e85d014d52a2aba0835319c212
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62855
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/test_util.h')
-rw-r--r-- | include/test_util.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/test_util.h b/include/test_util.h index cf98dd222c..ae237809c1 100644 --- a/include/test_util.h +++ b/include/test_util.h @@ -62,27 +62,43 @@ return EC_ERROR_UNKNOWN; \ } while (0) +/* Hooks gcov_flush() for test coverage report generation */ void register_test_end_hook(void); +/* Test entry point */ void run_test(void); +/* Resets test error count */ void test_reset(void); +/* Reports test pass */ void test_pass(void); +/* Reports test failure */ void test_fail(void); +/* Prints test result, including number of failed tests */ void test_print_result(void); +/* Returns the number of failed tests */ int test_get_error_count(void); +/* Simulates host command sent from the host */ int test_send_host_command(int command, int version, const void *params, int params_size, void *resp, int resp_size); +/* Number of failed tests */ extern int __test_error_count; +/* Simulates UART input */ void uart_inject_char(char *s, int sz); #define UART_INJECT(s) uart_inject_char(s, strlen(s)); +/* Simulates chipset power on */ +void test_chipset_on(void); + +/* Simulates chipset power off */ +void test_chipset_off(void); + #endif /* __CROS_EC_TEST_UTIL_H */ |