summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVic (Chun-Ju) Yang <victoryang@chromium.org>2014-01-07 21:56:32 +0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-01-08 03:49:29 +0000
commit1c545a85e2ed1d7bb28d155324f963f1f57d1c18 (patch)
tree6626eb238277e26a7ae7bd48974c874df32cb531
parent4cf4fcf1cb6a4332a27dd76ae19ba8852ddbaaec (diff)
downloadchrome-ec-1c545a85e2ed1d7bb28d155324f963f1f57d1c18.tar.gz
Fix kb_8042 test
The mock power button GPIO is initially low, so we need to set it high before testing it. Also, wait for all tasks to start before starting the test to prevent race condition. BUG=chrome-os-partner:19236 TEST=Pass the test BRANCH=None Change-Id: I813588a9c721815c1213882f7a9458daea4d78eb Signed-off-by: Vic (Chun-Ju) Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/181744 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--test/kb_8042.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/kb_8042.c b/test/kb_8042.c
index 88bae5d633..576f8da9c8 100644
--- a/test/kb_8042.c
+++ b/test/kb_8042.c
@@ -197,6 +197,7 @@ static int test_scancode_set2(void)
static int test_power_button(void)
{
+ gpio_set_level(GPIO_POWER_BUTTON_L, 1);
set_scancode(1);
test_chipset_on();
@@ -257,6 +258,7 @@ static int test_sysjump_cont(void)
void run_test(void)
{
test_reset();
+ wait_for_task_started();
if (system_get_image_copy() == SYSTEM_IMAGE_RO) {
RUN_TEST(test_single_key_press);