use of com.google.devtools.build.lib.analysis.config.BuildConfiguration in project bazel by bazelbuild.
the class ConfigurationTestCase method assertConfigurationsHaveUniqueOutputDirectories.
public void assertConfigurationsHaveUniqueOutputDirectories(BuildConfigurationCollection configCollection) throws Exception {
Collection<BuildConfiguration> allConfigs = configCollection.getAllConfigurations();
Map<Root, BuildConfiguration> outputPaths = new HashMap<>();
for (BuildConfiguration config : allConfigs) {
if (config.isActionsEnabled()) {
BuildConfiguration otherConfig = outputPaths.get(config.getOutputDirectory(RepositoryName.MAIN));
if (otherConfig != null) {
throw new IllegalStateException("The output path '" + config.getOutputDirectory(RepositoryName.MAIN) + "' is the same for configurations '" + config + "' and '" + otherConfig + "'");
} else {
outputPaths.put(config.getOutputDirectory(RepositoryName.MAIN), config);
}
}
}
}
Aggregations