summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-07-23 12:13:42 +0800
committerChromeBot <chrome-bot@google.com>2013-07-24 15:50:19 -0700
commit99e4a977986f67334f6b82a87f23f66cf88f4cb4 (patch)
tree3002343b1906ee1f4ae1a49599ccfad319e4a0db /util
parent5afcb815d60ed16c6bfe48ea9103223acb2e0e0d (diff)
downloadchrome-ec-99e4a977986f67334f6b82a87f23f66cf88f4cb4.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 Change-Id: Ifa510442de19256c671ab91b6bc75fe9e8b9dc7b 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>
Diffstat (limited to 'util')
-rwxr-xr-xutil/run_host_test13
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