summaryrefslogtreecommitdiff
path: root/include/test_util.h
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-07-04 16:34:50 +0800
committerChromeBot <chrome-bot@google.com>2013-07-11 04:26:09 -0700
commitb3f1d0d0593a430a5fb7605e5fc4337ae0a8833c (patch)
tree51962e353c36e1233f0b81021381a6f3d0922742 /include/test_util.h
parent6b46a0cfc5f26fef296feb3ded61762f1760fc49 (diff)
downloadchrome-ec-b3f1d0d0593a430a5fb7605e5fc4337ae0a8833c.tar.gz
Add function to inject console input from test
This can be used to test console command. BUG=chrome-os-partner:19236 TEST=Build success BRANCH=None Change-Id: I7ce002f9e66fd7786492bacb453f126b9766d741 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/60978 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/test_util.h')
-rw-r--r--include/test_util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/test_util.h b/include/test_util.h
index d63acfa741..fe7ede5f9b 100644
--- a/include/test_util.h
+++ b/include/test_util.h
@@ -81,4 +81,8 @@ int test_send_host_command(int command, int version, const void *params,
extern int __test_error_count;
+void uart_inject_char(char *s, int sz);
+
+#define UART_INJECT(s) uart_inject_char(s, strlen(s));
+
#endif /* __CROS_EC_TEST_UTIL_H */