コード例 #1
0
ファイル: BuildTool.java プロジェクト: rhuss/bazel
 private final BuildConfigurationCollection getConfigurations(
     BuildOptions buildOptions, Set<String> multiCpu, boolean keepGoing)
     throws InvalidConfigurationException, InterruptedException {
   SkyframeExecutor executor = runtime.getSkyframeExecutor();
   // TODO(bazel-team): consider a possibility of moving ConfigurationFactory construction into
   // skyframe.
   return executor.createConfigurations(
       runtime.getConfigurationFactory(),
       buildOptions,
       runtime.getDirectories(),
       multiCpu,
       keepGoing);
 }
コード例 #2
0
  protected BuildConfigurationCollection createCollection(String... args) throws Exception {
    OptionsParser parser =
        OptionsParser.newOptionsParser(
            ImmutableList.<Class<? extends OptionsBase>>builder()
                .addAll(buildOptionClasses)
                .add(TestOptions.class)
                .build());
    parser.parse(args);
    ImmutableSortedSet<String> multiCpu =
        ImmutableSortedSet.copyOf(parser.getOptions(TestOptions.class).multiCpus);

    configurationFactory.forbidSanityCheck();
    BuildOptions buildOptions = BuildOptions.of(buildOptionClasses, parser);
    BuildConfigurationCollection collection =
        skyframeExecutor.createConfigurations(
            configurationFactory,
            buildOptions,
            new BlazeDirectories(outputBase, outputBase, workspace),
            multiCpu,
            false);
    return collection;
  }