Search in sources :

Example 1 with RuleSet

use of com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider.RuleSet in project bazel by bazelbuild.

the class BazelRuleClassProviderTest method checkModule.

private void checkModule(RuleSet top) {
    ConfiguredRuleClassProvider.Builder builder = new ConfiguredRuleClassProvider.Builder();
    builder.setToolsRepository(BazelRuleClassProvider.TOOLS_REPOSITORY);
    Set<RuleSet> result = new HashSet<>();
    result.add(BazelRuleClassProvider.BAZEL_SETUP);
    collectTransitiveClosure(result, top);
    for (RuleSet module : result) {
        module.init(builder);
    }
    ConfiguredRuleClassProvider provider = builder.build();
    assertThat(provider).isNotNull();
    checkConfigConsistency(provider);
}
Also used : RuleSet(com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider.RuleSet) ConfiguredRuleClassProvider(com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider) HashSet(java.util.HashSet)

Aggregations

ConfiguredRuleClassProvider (com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider)1 RuleSet (com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider.RuleSet)1 HashSet (java.util.HashSet)1