diff options
author | Vic Yang <victoryang@chromium.org> | 2013-07-23 12:13:42 +0800 |
---|---|---|
committer | Bill Richardson <wfrichar@chromium.org> | 2013-07-30 10:35:40 -0700 |
commit | 7431c57f476c6a9ceb7fb7f34480ecd142bb9306 (patch) | |
tree | 3002343b1906ee1f4ae1a49599ccfad319e4a0db /util | |
parent | 004236110b1f55a5a8e4e2c2e86f2d3f0c1b0a50 (diff) | |
download | chrome-ec-7431c57f476c6a9ceb7fb7f34480ecd142bb9306.tar.gz |
Reboot emulator with execv()
With this, the emulator is able to reboot itself without the help of
run_host_test script. This makes it easier for development and also
speeds up the test.
BUG=chrome-os-partner:19235
TEST=Pass all tests
BRANCH=None
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62969
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
(cherry picked from commit 99e4a977986f67334f6b82a87f23f66cf88f4cb4)
Change-Id: Ib0b0cf4016e3f2cec8b164a4b4c89b5da438f2a4
Reviewed-on: https://gerrit.chromium.org/gerrit/63727
Commit-Queue: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'util')
-rwxr-xr-x | util/run_host_test | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/util/run_host_test b/util/run_host_test index e36e8d8280..ba59454527 100755 --- a/util/run_host_test +++ b/util/run_host_test @@ -11,12 +11,9 @@ import time TIMEOUT=10 -EXIT_CODE_REBOOT = (1 << 6) - RESULT_ID_TIMEOUT = 0 RESULT_ID_PASS = 1 RESULT_ID_FAIL = 2 -RESULT_ID_REBOOT = 3 EXPECT_LIST = [pexpect.TIMEOUT, 'Pass!', 'Fail!'] @@ -40,11 +37,7 @@ def RunOnce(test_name, log, timeout_secs): return child.expect(EXPECT_LIST) except pexpect.EOF: child.close() - if child.exitstatus & EXIT_CODE_REBOOT: - sys.stderr.write('System rebooting\n') - return RESULT_ID_REBOOT - else: - raise + raise finally: child.kill(15) @@ -53,9 +46,7 @@ tee_log = Tee(log) test_name = sys.argv[1] start_time = time.time() -result_id = RESULT_ID_REBOOT -while result_id == RESULT_ID_REBOOT: - result_id = RunOnce(test_name, tee_log, start_time + TIMEOUT - time.time()) +result_id = RunOnce(test_name, tee_log, start_time + TIMEOUT - time.time()) elapsed_time = time.time() - start_time failed = False |