Ejemplo n.º 1
0
 def run(self):
     # Since the workers are modifying the configuration tree when doing the string interpolation
     # we save it as a string and replay it each iteration.
     original_node = ET.tostring(self.config)
     var_name = self.config.attrib["variable"]
     var_range = eval(self.config.attrib["range"])
     self.logger.info("Starting variation loop, variable: %s, range: %s", var_name, var_range)
     wd = os.getcwd()
     for var in var_range:
         ctx = self.context
         ctx.update( {var_name : var} )
         self.logger.info("Doing variation, variable: %s, value: %s", var_name, var)
         os.chdir(wd)
         wf = WorkerFactory(ET.ElementTree(self.config), self.context)
         wf.execute()
         self.config = ET.fromstring(original_node)
Ejemplo n.º 2
0
 def run(self):
     # Since the workers are modifying the configuration tree when doing the string interpolation
     # we save it as a string and replay it each iteration.
     original_node = ET.tostring(self.config)
     var_name = self.config.attrib["variable"]
     var_range = eval(self.config.attrib["range"])
     self.logger.info("Starting variation loop, variable: %s, range: %s",
                      var_name, var_range)
     wd = os.getcwd()
     for var in var_range:
         ctx = self.context
         ctx.update({var_name: var})
         self.logger.info("Doing variation, variable: %s, value: %s",
                          var_name, var)
         os.chdir(wd)
         wf = WorkerFactory(ET.ElementTree(self.config), self.context)
         wf.execute()
         self.config = ET.fromstring(original_node)
Ejemplo n.º 3
0
 def run(self):
     """ Runs its subworkers. """
     wf = WorkerFactory(ET.ElementTree(self.config), self.context)
     wf.execute()
Ejemplo n.º 4
0
 def run(self):
     """ Runs its subworkers. """
     wf = WorkerFactory(ET.ElementTree(self.config), self.context)
     wf.execute()