@@ -0,0 +1,1975 @@
+import optparse%0D%0Aimport os%0D%0Aimport pickle%0D%0Aimport shutil%0D%0Aimport subprocess%0D%0Aimport sys%0D%0A%0D%0ADEFAULT_SLAVENAME = 'production-slave'%0D%0ADEFAULT_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)),%0D%0A                            DEFAULT_SLAVENAME)%0D%0A%0D%0Adef StartSlave(slavename):%0D%0A  print 'Starting slave: %25s' %25 slavename%0D%0A  slave_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)),%0D%0A                           slavename)%0D%0A  if not os.path.isdir(slave_dir):%0D%0A    print 'creating directory: %25s' %25 slave_dir%0D%0A    shutil.copytree(DEFAULT_DIR, slave_dir)%0D%0A  try:%0D%0A    os.remove(os.path.join(slave_dir, 'buildbot', 'third_party', 'chromium_buildbot', 'slave', 'twistd.pid'))%0D%0A  except:%0D%0A    pass%0D%0A  cmd = 'setlocal &&'%0D%0A  cmd += 'net use O: %5C%5C%5C%5Clocalhost%5C%25s&&O:&&cd %25s&&' %25 (slave_dir.replace(':', '$'), os.path.join('buildbot', 'slave'))%0D%0A  if slavename != DEFAULT_SLAVENAME:%0D%0A    cmd += 'set TESTING_SLAVENAME=%25s&&' %25 slavename%0D%0A  cmd += 'run_slave.bat'%0D%0A  cmd += '&& endlocal'%0D%0A  print 'Running cmd: %25s' %25 cmd%0D%0A  subprocess.Popen(cmd, shell=True)%0D%0A%0D%0Adef LoadConfigFile(config_file):%0D%0A  f = open(config_file, 'r')%0D%0A  slaves = %5B%5D%0D%0A  for line in f:%0D%0A    line = line.rstrip('%5Cr%5Cn')%0D%0A    if line != '':%0D%0A      slaves.append(line)%0D%0A  f.close()%0D%0A  return slaves%0D%0A%0D%0Adef main(argv):%0D%0A  %22%22%22 Launch local build slave instances %22%22%22%0D%0A  option_parser = optparse.OptionParser()%0D%0A  option_parser.add_option(%0D%0A      '--config_file',%0D%0A      help='file containing slavenames to run on this machine')%0D%0A  (options, args) = option_parser.parse_args()%0D%0A  if len(args) != 0:%0D%0A    raise Exception('bogus command-line argument; rerun with --help')%0D%0A  if not options.config_file:%0D%0A    raise Exception('missing command-line option %25s; rerun with --help' %25%0D%0A        '--config_file')%0D%0A  slaves = LoadConfigFile(options.config_file)%0D%0A  if not slaves:%0D%0A    slaves = %5BDEFAULT_SLAVENAME%5D%0D%0A  for slavename in slaves:%0D%0A    StartSlave(slavename)%0D%0A%0D%0Aif '__main__' == __name__:%0D%0A  sys.exit(main(None))%0D%0A

Add launch_slaves.py