diff options
author | Vic Yang <victoryang@chromium.org> | 2013-04-28 14:39:46 +0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-04-29 03:47:49 -0700 |
commit | 9cbd25052e3d868c695fc41db6f8d9a32efaadea (patch) | |
tree | e1ed26c22caac5feea8ab5bed9ece6d4a742d9ca /test | |
parent | 0bc9888c83bd2bc9c1650b4d824aff67e912d598 (diff) | |
download | chrome-ec-9cbd25052e3d868c695fc41db6f8d9a32efaadea.tar.gz |
Fix kb_scan test when CONFIG_LID_SWITCH is not defined
If we don't have lid switch, don't test it.
BUG=chrome-os-partner:18598
TEST=Build on mccroskey and see errors about GPIO_LID_OPEN go away.
BRANCH=None
Change-Id: I1084e1bfc2e6bd611dc393c1b2d501e786d2a0e3
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49450
Diffstat (limited to 'test')
-rw-r--r-- | test/kb_scan.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/kb_scan.c b/test/kb_scan.c index 91b0f4950d..32822d689d 100644 --- a/test/kb_scan.c +++ b/test/kb_scan.c @@ -52,12 +52,14 @@ static int fifo_add_count; static int error_count; static int lid_open; +#ifdef CONFIG_LID_SWITCH int gpio_get_level(enum gpio_signal signal) { if (signal == GPIO_LID_OPEN) return lid_open; return 0; } +#endif void keyboard_raw_drive_column(int out) { @@ -236,6 +238,7 @@ int debounce_test(void) return EC_SUCCESS; } +#ifdef CONFIG_LID_SWITCH int lid_test(void) { lid_open = 0; @@ -252,6 +255,7 @@ int lid_test(void) return EC_SUCCESS; } +#endif static int command_run_test(int argc, char **argv) { @@ -260,7 +264,9 @@ static int command_run_test(int argc, char **argv) RUN_TEST(deghost_test); RUN_TEST(debounce_test); +#ifdef CONFIG_LID_SWITCH RUN_TEST(lid_test); +#endif if (error_count == 0) { ccprintf("Pass!\n"); |