Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: client/site_tests/suite_Factory/control

Issue 3365003: Fix waiting for ui on reboot. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/bin/factory_ui ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/site_tests/suite_Factory/control
diff --git a/client/site_tests/suite_Factory/control b/client/site_tests/suite_Factory/control
index 269031eafef6744c7ccc16ed219d86107436e5d9..3b8bcc80ccd8f8c45ddf248bca553db933503109 100644
--- a/client/site_tests/suite_Factory/control
+++ b/client/site_tests/suite_Factory/control
@@ -69,6 +69,15 @@ job.bootloader.set_default = lambda x: None
job.bootloader.boot_once = lambda x: None
+def start_ui():
+ ui_proc_args = [FACTORY_UI_PATH, TEST_LIST_PATH,
+ STATUS_FILE_PATH, str(os.getpid())]
+ factory.log('starting ui -- %s' % repr(ui_proc_args))
+ sp = subprocess.Popen(ui_proc_args, stdout=subprocess.PIPE)
+ factory.log('waiting for ui to come up...')
+ factory.log('got message from UI : %s' % repr(sp.stdout.readline().strip()))
+
+
def step_reboot_seq(tag_prefix, total_iterations, i=0):
if i < total_iterations:
job.next_step_prepend([step_reboot_seq, tag_prefix,
@@ -82,10 +91,7 @@ def step_reboot_seq(tag_prefix, total_iterations, i=0):
def step_init(intentional_reboot_subtest_tag_prefix=None):
job.next_step([step_init])
- ui_proc_args = [FACTORY_UI_PATH, TEST_LIST_PATH,
- STATUS_FILE_PATH, str(os.getpid())]
- factory.log('starting ui -- %s' % repr(ui_proc_args))
- ui_proc = subprocess.Popen(ui_proc_args)
+ start_ui()
status_map = factory.StatusMap(TEST_LIST, STATUS_FILE_PATH)
control_state = factory.ControlState(
« no previous file with comments | « client/bin/factory_ui ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698