Ejemplo n.º 1
0
    if runner is None:
        runner = SubprocessRunner(console, verbose)
        caching_runner = CachingRunner(runner, console)
        runner = caching_runner

        # Note that all configurations share a common cache.pickle.
        _restore_pickle(caching_runner, "cache.pickle")

    loader = Loader(config.root_dir)
    builder = Builder(console)

    if argv[0] == "test":
        for rule in _args_to_rules(loader, args):
            if isinstance(rule, Test):
                builder.add_test(config, rule)
    else:
        # caihsiaoster: Support ":all" to build all targets in the sebs
        prefix = args[0].split(":", 1)
        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)
Ejemplo n.º 2
0
  if runner is None:
    runner = SubprocessRunner(console, verbose)
    caching_runner = CachingRunner(runner, console)
    runner = caching_runner

    # Note that all configurations share a common cache.pickle.
    _restore_pickle(caching_runner, "cache.pickle")

  loader = Loader(config.root_dir)
  builder = Builder(console)

  if argv[0] == "test":
    for rule in _args_to_rules(loader, args):
      if isinstance(rule, Test):
        builder.add_test(config, rule)
  else:
    # caihsiaoster: Support ":all" to build all targets in the sebs
    prefix = args[0].split(":", 1)
    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)