Commit Graph

3 Commits

Author SHA1 Message Date
Vic Yang
cdcaf6ed8a Add interrupt support for emulator
This provides us a way to inject interrupts during a test. If a test has
interrupt_generator() defined, it will run in a separate thread. The
generator can then trigger interrupts when it decides to. The current
running task is suspended while emulator is executing ISR.

Also fixes a bug that tasks run without scheduler notifying them during
emulator start-up.

BUG=chrome-os-partner:19235
TEST=Repeatedly run all tests.
BRANCH=None

Change-Id: I0f921c47c0f848a9626da6272d9040e2b7c5ac86
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/55671
2014-01-06 12:40:45 +00:00
Vic Yang
bd74ad1e20 Test more error cases of host command handling
This adds tests of invalid command version and invalid command.

BUG=chrome-os-partner:19236
TEST=Pass host_command test
BRANCH=None

Change-Id: I49ce1b4c8b31ef98d9ee8203e88adfa521471d6d
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/170935
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2013-10-01 08:16:38 +00:00
Vic Yang
844f4127e8 Add host command test
This test checks host command interface handles errors correctly.

BUG=chrome-os-partner:19236
TEST=Pass host_command test
BRANCH=None

Change-Id: I62764977d2063edf5abd37e78e074384eec5f0d4
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/167762
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2013-09-04 20:32:52 +00:00