- for S in ordered_steps:
- step = self.step_lookup[S]
- start_time=time.time()
-
- sync_step = step(driver=self.driver,error_map=error_mapper)
+ # Wait for step dependencies to be met
+ try:
+ deps = self.dependency_graph[S]
+ has_deps = True
+ except KeyError:
+ has_deps = False
+
+ go = False
+
+ if (has_deps):
+ for d in deps:
+ if d==step.__name__:
+ logger.info(" step %s self-wait skipped" % step.__name__)
+ go = True
+ continue
+
+ cond = self.step_conditions[d]
+ cond.acquire()
+ if (self.step_status[d] is STEP_STATUS_WORKING):
+ logger.info(" step %s wait on dep %s" % (step.__name__, d))
+ cond.wait()
+ cond.release()
+ go = go or self.step_status[d] == STEP_STATUS_OK
+ else:
+ go = True
+
+ if (not go):
+ # SMBAKER: sync_step was not defined here, so I changed
+ # this from 'sync_step' to 'step'. Verify.
+ self.failed_steps.append(step)
+ my_status = STEP_STATUS_KO
+ else:
+ sync_step = step(driver=self.driver,error_map=self.error_mapper)