Ejemplo n.º 1
0
        new_args = args
        if prefix[-1] == 'all':
            new_args = []
            for arg in args:
                if arg.startswith("src/") or arg.startswith("src\\"):
                    arg = arg[4:]
                elif arg.startswith("//"):
                    arg = arg[2:]
                parts = arg.rsplit(":", 1)
                (file, context) = loader.load_file(parts[0])
                for key in file.__dict__.copy():
                    new_args.append(str(prefix[0]) + ':' + key)

        #for rule in _args_to_rules(loader, args):
        for rule in _args_to_rules(loader, new_args):
            builder.add_rule(config, rule)

    thread_objects = []
    success = True
    for i in range(0, threads):
        thread_objects.append(
            threading.Thread(target=builder.build, args=[runner]))
        thread_objects[-1].start()
    try:
        for thread in thread_objects:
            thread.join()
    except KeyboardInterrupt:
        if not builder.failed:
            console.write(ColoredText(ColoredText.RED, "INTERRUPTED"))
            builder.failed = True
        for thread in thread_objects:
Ejemplo n.º 2
0
    new_args = args
    if prefix[-1] == 'all':
      new_args = []
      for arg in args:
        if arg.startswith("src/") or arg.startswith("src\\"):
          arg = arg[4:]
        elif arg.startswith("//"):
          arg = arg[2:]
        parts = arg.rsplit(":", 1)
        (file, context) = loader.load_file(parts[0])
        for key in file.__dict__.copy():
          new_args.append(str(prefix[0]) + ':' + key)

    #for rule in _args_to_rules(loader, args):
    for rule in _args_to_rules(loader, new_args):
      builder.add_rule(config, rule)

  thread_objects = []
  success = True
  for i in range(0, threads):
    thread_objects.append(
      threading.Thread(target = builder.build, args = [runner]))
    thread_objects[-1].start()
  try:
    for thread in thread_objects:
      thread.join()
  except KeyboardInterrupt:
    if not builder.failed:
      console.write(ColoredText(ColoredText.RED, "INTERRUPTED"))
      builder.failed = True
    for thread in thread_objects: