Search in sources :

Example 11 with FakeAndroidDirectoryResolver

use of com.facebook.buck.android.FakeAndroidDirectoryResolver in project buck by facebook.

the class KnownBuildRuleTypesTest method canOverrideMultipleHostPlatforms.

@Test
public void canOverrideMultipleHostPlatforms() throws Exception {
    ProjectFilesystem filesystem = new ProjectFilesystem(temporaryFolder.getRoot());
    ImmutableMap<String, ImmutableMap<String, String>> sections = ImmutableMap.of("cxx#linux-x86_64", ImmutableMap.of("cache_links", "true"), "cxx#macosx-x86_64", ImmutableMap.of("cache_links", "true"), "cxx#windows-x86_64", ImmutableMap.of("cache_links", "true"));
    BuckConfig buckConfig = FakeBuckConfig.builder().setSections(sections).build();
    // It should be legal to override multiple host platforms even though
    // only one will be practically used in a build.
    KnownBuildRuleTypes.createBuilder(buckConfig, filesystem, createExecutor(), new FakeAndroidDirectoryResolver()).build();
}
Also used : FakeAndroidDirectoryResolver(com.facebook.buck.android.FakeAndroidDirectoryResolver) BuckConfig(com.facebook.buck.cli.BuckConfig) FakeBuckConfig(com.facebook.buck.cli.FakeBuckConfig) ProjectFilesystem(com.facebook.buck.io.ProjectFilesystem) ImmutableMap(com.google.common.collect.ImmutableMap) Test(org.junit.Test)

Aggregations

FakeAndroidDirectoryResolver (com.facebook.buck.android.FakeAndroidDirectoryResolver)11 ProjectFilesystem (com.facebook.buck.io.ProjectFilesystem)8 BuckConfig (com.facebook.buck.cli.BuckConfig)7 FakeBuckConfig (com.facebook.buck.cli.FakeBuckConfig)7 ImmutableMap (com.google.common.collect.ImmutableMap)6 Test (org.junit.Test)6 NoopArtifactCache (com.facebook.buck.artifact_cache.NoopArtifactCache)4 FakeJavaPackageFinder (com.facebook.buck.jvm.java.FakeJavaPackageFinder)4 Cell (com.facebook.buck.rules.Cell)4 TestCellBuilder (com.facebook.buck.rules.TestCellBuilder)4 TestConsole (com.facebook.buck.testutil.TestConsole)4 FakeProcessExecutor (com.facebook.buck.util.FakeProcessExecutor)4 ArtifactCache (com.facebook.buck.artifact_cache.ArtifactCache)3 BuckEventBus (com.facebook.buck.event.BuckEventBus)3 FakeProjectFilesystem (com.facebook.buck.testutil.FakeProjectFilesystem)3 Before (org.junit.Before)3 AndroidDirectoryResolver (com.facebook.buck.android.AndroidDirectoryResolver)2 Flavor (com.facebook.buck.model.Flavor)2 InternalFlavor (com.facebook.buck.model.InternalFlavor)2 ProcessExecutor (com.facebook.buck.util.ProcessExecutor)2