for pluginarg in config.option.plugins: config.pluginmanager.consider_pluginarg(pluginarg) return config if __name__ == '__main__': import argparse parser = argparse.ArgumentParser() parser.add_argument('slaveid', help='The name of this slave') parser.add_argument('appliance_json', help='The json data about the used appliance') parser.add_argument('ts', help='The timestap to use for collections') args = parser.parse_args() from utils.appliance import IPAppliance, stack appliance = IPAppliance.from_json(args.appliance_json) stack.push(appliance) # overwrite the default logger before anything else is imported, # to get our best chance at having everything import the replaced logger import utils.log utils.log.setup_for_worker(args.slaveid) from fixtures import terminalreporter from fixtures.pytest_store import store from utils import conf conf.runtime['env']['slaveid'] = args.slaveid conf.runtime['env']['ts'] = args.ts store.parallelizer_role = 'slave'
for pluginarg in config.option.plugins: config.pluginmanager.consider_pluginarg(pluginarg) config.pluginmanager.consider_pluginarg('no:fixtures.parallelizer') return config if __name__ == '__main__': import argparse parser = argparse.ArgumentParser() parser.add_argument('slaveid', help='The name of this slave') parser.add_argument('appliance_json', help='The json data about the used appliance') parser.add_argument('ts', help='The timestap to use for collections') args = parser.parse_args() from utils.appliance import IPAppliance, stack appliance = IPAppliance.from_json(args.appliance_json) stack.push(appliance) # overwrite the default logger before anything else is imported, # to get our best chance at having everything import the replaced logger import utils.log utils.log.setup_for_worker(args.slaveid) from fixtures import terminalreporter from fixtures.pytest_store import store from utils import conf conf.runtime['env']['slaveid'] = args.slaveid conf.runtime['env']['ts'] = args.ts store.parallelizer_role = 'slave'