[autotest] Update sequence.py to support machines as dicts.
Sequence.py expected the machine instance to be a String but
machines are now represented as dicts. This change fixes a bug
that prevents sequences from running.
BUG=chromium:569630
TEST=./brillo_test_launcher.py -m 100.96.51.136 -t control.brillo_pts \
--quickmerge
Change-Id: I6c90eeabb6e61594fadfe81f20e77b309532a4b7
Reviewed-on: https://chromium-review.googlesource.com/318280
Reviewed-by: Dan Shi <[email protected]>
Tested-by: Simran Basi <[email protected]>
diff --git a/server/sequence.py b/server/sequence.py
index 5983af5..3a86f58 100644
--- a/server/sequence.py
+++ b/server/sequence.py
@@ -136,16 +136,17 @@
current_job_id = job_directories.get_job_id_or_task_id(job.resultdir)
logging.debug('Current job id: %s', current_job_id)
runtime_mins = self.child_job_timeout()
+ hostname = utils.get_hostname_from_machine(machine)
for i in xrange(0, self._iteration):
- child_job_name = self.child_job_name(machine, i)
+ child_job_name = self.child_job_name(hostname, i)
logging.debug('Creating job: %s', child_job_name)
afe.create_job(
self.child_control_file(),
name=child_job_name,
priority='Medium',
control_type=control_data.CONTROL_TYPE.SERVER,
- hosts=[machine], meta_hosts=(), one_time_hosts=(),
+ hosts=[hostname], meta_hosts=(), one_time_hosts=(),
atomic_group_name=None, synch_count=None, is_template=False,
timeout_mins=timeout_mins + (i + 1) * runtime_mins,
max_runtime_mins=runtime_mins,