Search in sources :

Example 71 with FakeBuildRuleParamsBuilder

use of com.facebook.buck.rules.FakeBuildRuleParamsBuilder in project buck by facebook.

the class CxxCollectAndLogInferDependenciesStepTest method testStepWritesSingleCellTokenInFile.

@Test
public void testStepWritesSingleCellTokenInFile() throws IOException, InterruptedException {
    assumeThat(Platform.detect(), is(not(WINDOWS)));
    ProjectFilesystem filesystem = createFakeFilesystem("/Users/user/src");
    String cellName = "cellname";
    BuildTarget testBuildTarget = BuildTarget.builder().setUnflavoredBuildTarget(UnflavoredBuildTarget.of(filesystem.getRootPath(), Optional.of(cellName), "//target", "short")).addFlavors(CxxInferEnhancer.InferFlavors.INFER.get()).build();
    BuildRuleParams testBuildRuleParams = new FakeBuildRuleParamsBuilder(testBuildTarget).setProjectFilesystem(filesystem).build();
    InferBuckConfig inferBuckConfig = new InferBuckConfig(FakeBuckConfig.builder().build());
    CxxInferCaptureAndAggregatingRules<CxxInferAnalyze> captureAndAggregatingRules = new CxxInferCaptureAndAggregatingRules<>(ImmutableSet.of(), ImmutableSet.<CxxInferAnalyze>of());
    CxxInferAnalyze analyzeRule = new CxxInferAnalyze(testBuildRuleParams, inferBuckConfig, captureAndAggregatingRules);
    Path outputFile = Paths.get("infer-deps.txt");
    CxxCollectAndLogInferDependenciesStep step = CxxCollectAndLogInferDependenciesStep.fromAnalyzeRule(analyzeRule, filesystem, outputFile);
    ExecutionContext executionContext = TestExecutionContext.newInstance();
    int exitCode = step.execute(executionContext).getExitCode();
    assertThat(exitCode, is(StepExecutionResult.SUCCESS.getExitCode()));
    String expectedOutput = InferLogLine.fromBuildTarget(testBuildTarget, analyzeRule.getAbsolutePathToResultsDir()).toString();
    assertEquals(expectedOutput + "\n", filesystem.readFileIfItExists(outputFile).get());
}
Also used : FrameworkPath(com.facebook.buck.rules.coercer.FrameworkPath) SourcePath(com.facebook.buck.rules.SourcePath) FakeSourcePath(com.facebook.buck.rules.FakeSourcePath) Path(java.nio.file.Path) PathSourcePath(com.facebook.buck.rules.PathSourcePath) FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) ExecutionContext(com.facebook.buck.step.ExecutionContext) TestExecutionContext(com.facebook.buck.step.TestExecutionContext) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams) UnflavoredBuildTarget(com.facebook.buck.model.UnflavoredBuildTarget) BuildTarget(com.facebook.buck.model.BuildTarget) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) ProjectFilesystem(com.facebook.buck.io.ProjectFilesystem) Test(org.junit.Test)

Example 72 with FakeBuildRuleParamsBuilder

use of com.facebook.buck.rules.FakeBuildRuleParamsBuilder in project buck by facebook.

the class CxxCollectAndLogInferDependenciesStepTest method testStepWritesTwoCellTokensInFile.

@Test
public void testStepWritesTwoCellTokensInFile() throws Exception {
    assumeThat(Platform.detect(), is(not(WINDOWS)));
    // filesystem, buildTarget and buildRuleParams for first cell (analysis)
    ProjectFilesystem filesystem1 = createFakeFilesystem("/Users/user/cell_one");
    BuildTarget buildTarget1 = BuildTarget.builder().setUnflavoredBuildTarget(UnflavoredBuildTarget.of(filesystem1.getRootPath(), Optional.of("cell1"), "//target/in_cell_one", "short1")).addFlavors(CxxInferEnhancer.InferFlavors.INFER.get()).build();
    BuildRuleParams buildRuleParams1 = new FakeBuildRuleParamsBuilder(buildTarget1).setProjectFilesystem(filesystem1).build();
    // filesystem, buildTarget and buildRuleParams for second cell (capture)
    ProjectFilesystem filesystem2 = createFakeFilesystem("/Users/user/cell_two");
    BuildTarget buildTarget2 = BuildTarget.builder().setUnflavoredBuildTarget(UnflavoredBuildTarget.of(filesystem2.getRootPath(), Optional.of("cell2"), "//target/in_cell_two", "short2")).addFlavors(CxxInferEnhancer.InferFlavors.INFER_CAPTURE.get()).build();
    BuildRuleParams buildRuleParams2 = new FakeBuildRuleParamsBuilder(buildTarget2).setProjectFilesystem(filesystem2).build();
    BuildRuleResolver testBuildRuleResolver = new BuildRuleResolver(TargetGraph.EMPTY, new DefaultTargetNodeToBuildRuleTransformer());
    SourcePathResolver testSourcePathResolver = new SourcePathResolver(new SourcePathRuleFinder(testBuildRuleResolver));
    InferBuckConfig inferBuckConfig = new InferBuckConfig(FakeBuckConfig.builder().build());
    CxxInferCapture captureRule = createCaptureRule(buildRuleParams2, testSourcePathResolver, filesystem2, inferBuckConfig);
    CxxInferCaptureAndAggregatingRules<CxxInferAnalyze> captureAndAggregatingRules = new CxxInferCaptureAndAggregatingRules<>(ImmutableSet.of(captureRule), ImmutableSet.<CxxInferAnalyze>of());
    CxxInferAnalyze analyzeRule = new CxxInferAnalyze(buildRuleParams1, inferBuckConfig, captureAndAggregatingRules);
    Path outputFile = Paths.get("infer-deps.txt");
    CxxCollectAndLogInferDependenciesStep step = CxxCollectAndLogInferDependenciesStep.fromAnalyzeRule(analyzeRule, filesystem1, outputFile);
    ExecutionContext executionContext = TestExecutionContext.newInstance();
    int exitCode = step.execute(executionContext).getExitCode();
    assertThat(exitCode, is(StepExecutionResult.SUCCESS.getExitCode()));
    String expectedOutput = InferLogLine.fromBuildTarget(buildTarget1, analyzeRule.getAbsolutePathToResultsDir()).toString() + "\n" + InferLogLine.fromBuildTarget(buildTarget2, captureRule.getAbsolutePathToOutput()).toString();
    assertEquals(expectedOutput + "\n", filesystem1.readFileIfItExists(outputFile).get());
}
Also used : FrameworkPath(com.facebook.buck.rules.coercer.FrameworkPath) SourcePath(com.facebook.buck.rules.SourcePath) FakeSourcePath(com.facebook.buck.rules.FakeSourcePath) Path(java.nio.file.Path) PathSourcePath(com.facebook.buck.rules.PathSourcePath) FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) ExecutionContext(com.facebook.buck.step.ExecutionContext) TestExecutionContext(com.facebook.buck.step.TestExecutionContext) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams) UnflavoredBuildTarget(com.facebook.buck.model.UnflavoredBuildTarget) BuildTarget(com.facebook.buck.model.BuildTarget) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) ProjectFilesystem(com.facebook.buck.io.ProjectFilesystem) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) Test(org.junit.Test)

Example 73 with FakeBuildRuleParamsBuilder

use of com.facebook.buck.rules.FakeBuildRuleParamsBuilder in project buck by facebook.

the class DefaultRuleKeyFactoryTest method testFactoryReportsInputsAndDependenciesToCacheForRuleKeyAppendable.

@Test
public void testFactoryReportsInputsAndDependenciesToCacheForRuleKeyAppendable() throws IOException {
    SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(new BuildRuleResolver(TargetGraph.EMPTY, new DefaultTargetNodeToBuildRuleTransformer()));
    SourcePathResolver pathResolver = new SourcePathResolver(ruleFinder);
    NoopRuleKeyCache<RuleKey> noopRuleKeyCache = new NoopRuleKeyCache<>();
    ProjectFilesystem filesystem = new FakeProjectFilesystem();
    DefaultRuleKeyFactory factory = new DefaultRuleKeyFactory(new RuleKeyFieldLoader(0), new StackedFileHashCache(ImmutableList.of(DefaultFileHashCache.createDefaultFileHashCache(filesystem))), pathResolver, ruleFinder, noopRuleKeyCache);
    // Create a sample input.
    PathSourcePath input = new PathSourcePath(filesystem, filesystem.getPath("input"));
    filesystem.touch(input.getRelativePath());
    // Create a sample dep rule.
    BuildRule dep = new EmptyRule(BuildTargetFactory.newInstance("//:dep"));
    // Create a sample dep appendable.
    RuleKeyAppendable depAppendable = sink -> {
    };
    // Create a sample rule key appendable.
    RuleKeyAppendable appendable = sink -> {
        sink.setReflectively("input", input);
        sink.setReflectively("dep", dep);
        sink.setReflectively("depAppendable", depAppendable);
    };
    // Create a dummy build rule that uses the input.
    BuildRule rule = new NoopBuildRule(new FakeBuildRuleParamsBuilder("//:target").setProjectFilesystem(filesystem).build()) {

        @AddToRuleKey
        private final RuleKeyAppendable appendableField = appendable;
    };
    // Build the rule key.
    factory.build(rule);
    // Verify the input was properly reported to the rule key cache.
    RuleKeyResult<RuleKey> result = noopRuleKeyCache.results.get(appendable);
    assertThat(result, Matchers.notNullValue());
    assertThat(result.inputs, Matchers.containsInAnyOrder(RuleKeyInput.of(filesystem, input.getRelativePath())));
    assertThat(result.deps, Matchers.containsInAnyOrder(dep, depAppendable));
}
Also used : Arrays(java.util.Arrays) BuildRuleType(com.facebook.buck.rules.BuildRuleType) LIBRARY(com.facebook.buck.rules.BuildableProperties.Kind.LIBRARY) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) SourceRoot(com.facebook.buck.rules.SourceRoot) RuleKeyAppendable(com.facebook.buck.rules.RuleKeyAppendable) Assert.assertThat(org.junit.Assert.assertThat) ProjectFilesystem(com.facebook.buck.io.ProjectFilesystem) NoopBuildRule(com.facebook.buck.rules.NoopBuildRule) RuleKey(com.facebook.buck.rules.RuleKey) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) Map(java.util.Map) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) Objects(com.google.common.base.Objects) RuleKeyObjectSink(com.facebook.buck.rules.RuleKeyObjectSink) Path(java.nio.file.Path) ImmutableSet(com.google.common.collect.ImmutableSet) AddToRuleKey(com.facebook.buck.rules.AddToRuleKey) ImmutableMap(com.google.common.collect.ImmutableMap) BuildableProperties(com.facebook.buck.rules.BuildableProperties) BuildableContext(com.facebook.buck.rules.BuildableContext) TargetGraph(com.facebook.buck.rules.TargetGraph) DefaultFileHashCache(com.facebook.buck.util.cache.DefaultFileHashCache) BuildTarget(com.facebook.buck.model.BuildTarget) Sha1HashCode(com.facebook.buck.util.sha1.Sha1HashCode) PathSourcePath(com.facebook.buck.rules.PathSourcePath) Optional(java.util.Optional) FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) Pattern(java.util.regex.Pattern) CacheStats(com.google.common.cache.CacheStats) Step(com.facebook.buck.step.Step) SourcePath(com.facebook.buck.rules.SourcePath) Either(com.facebook.buck.model.Either) Function(java.util.function.Function) BuildRule(com.facebook.buck.rules.BuildRule) ImmutableList(com.google.common.collect.ImmutableList) NullFileHashCache(com.facebook.buck.util.cache.NullFileHashCache) BuildTargetFactory(com.facebook.buck.model.BuildTargetFactory) Suppliers(com.google.common.base.Suppliers) Nullable(javax.annotation.Nullable) ImmutableSortedSet(com.google.common.collect.ImmutableSortedSet) Matchers(org.hamcrest.Matchers) Test(org.junit.Test) IOException(java.io.IOException) Assert.assertNotEquals(org.junit.Assert.assertNotEquals) StackedFileHashCache(com.facebook.buck.util.cache.StackedFileHashCache) Paths(java.nio.file.Paths) FileHashCache(com.facebook.buck.util.cache.FileHashCache) BuildContext(com.facebook.buck.rules.BuildContext) Preconditions(com.google.common.base.Preconditions) MapMaker(com.google.common.collect.MapMaker) Assert.assertEquals(org.junit.Assert.assertEquals) RuleKey(com.facebook.buck.rules.RuleKey) AddToRuleKey(com.facebook.buck.rules.AddToRuleKey) NoopBuildRule(com.facebook.buck.rules.NoopBuildRule) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) PathSourcePath(com.facebook.buck.rules.PathSourcePath) FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) StackedFileHashCache(com.facebook.buck.util.cache.StackedFileHashCache) NoopBuildRule(com.facebook.buck.rules.NoopBuildRule) BuildRule(com.facebook.buck.rules.BuildRule) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) ProjectFilesystem(com.facebook.buck.io.ProjectFilesystem) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) RuleKeyAppendable(com.facebook.buck.rules.RuleKeyAppendable) Test(org.junit.Test)

Example 74 with FakeBuildRuleParamsBuilder

use of com.facebook.buck.rules.FakeBuildRuleParamsBuilder in project buck by facebook.

the class DefaultRuleKeyFactoryTest method testFactoryReportsInputsAndDependenciesToCacheForBuildRule.

@Test
public void testFactoryReportsInputsAndDependenciesToCacheForBuildRule() throws IOException {
    SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(new BuildRuleResolver(TargetGraph.EMPTY, new DefaultTargetNodeToBuildRuleTransformer()));
    SourcePathResolver pathResolver = new SourcePathResolver(ruleFinder);
    NoopRuleKeyCache<RuleKey> noopRuleKeyCache = new NoopRuleKeyCache<>();
    ProjectFilesystem filesystem = new FakeProjectFilesystem();
    DefaultRuleKeyFactory factory = new DefaultRuleKeyFactory(new RuleKeyFieldLoader(0), new StackedFileHashCache(ImmutableList.of(DefaultFileHashCache.createDefaultFileHashCache(filesystem))), pathResolver, ruleFinder, noopRuleKeyCache);
    // Create a sample input.
    PathSourcePath input = new PathSourcePath(filesystem, filesystem.getPath("input"));
    filesystem.touch(input.getRelativePath());
    // Create a sample dep rule.
    BuildRule dep = new EmptyRule(BuildTargetFactory.newInstance("//:dep"));
    // Create a sample rule key appendable.
    RuleKeyAppendable appendable = sink -> {
    };
    // Create a dummy build rule that uses the input.
    BuildRule rule = new NoopBuildRule(new FakeBuildRuleParamsBuilder("//:target").setProjectFilesystem(filesystem).setDeclaredDeps(ImmutableSortedSet.of(dep)).build()) {

        @AddToRuleKey
        private final SourcePath inputField = input;

        @AddToRuleKey
        private final RuleKeyAppendable appendableField = appendable;
    };
    // Build the rule key.
    factory.build(rule);
    // Verify the input was properly reported to the rule key cache.
    RuleKeyResult<RuleKey> result = noopRuleKeyCache.results.get(rule);
    assertThat(result, Matchers.notNullValue());
    assertThat(result.inputs, Matchers.containsInAnyOrder(RuleKeyInput.of(filesystem, input.getRelativePath())));
    assertThat(result.deps, Matchers.containsInAnyOrder(dep, appendable));
}
Also used : Arrays(java.util.Arrays) BuildRuleType(com.facebook.buck.rules.BuildRuleType) LIBRARY(com.facebook.buck.rules.BuildableProperties.Kind.LIBRARY) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) SourceRoot(com.facebook.buck.rules.SourceRoot) RuleKeyAppendable(com.facebook.buck.rules.RuleKeyAppendable) Assert.assertThat(org.junit.Assert.assertThat) ProjectFilesystem(com.facebook.buck.io.ProjectFilesystem) NoopBuildRule(com.facebook.buck.rules.NoopBuildRule) RuleKey(com.facebook.buck.rules.RuleKey) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) Map(java.util.Map) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) Objects(com.google.common.base.Objects) RuleKeyObjectSink(com.facebook.buck.rules.RuleKeyObjectSink) Path(java.nio.file.Path) ImmutableSet(com.google.common.collect.ImmutableSet) AddToRuleKey(com.facebook.buck.rules.AddToRuleKey) ImmutableMap(com.google.common.collect.ImmutableMap) BuildableProperties(com.facebook.buck.rules.BuildableProperties) BuildableContext(com.facebook.buck.rules.BuildableContext) TargetGraph(com.facebook.buck.rules.TargetGraph) DefaultFileHashCache(com.facebook.buck.util.cache.DefaultFileHashCache) BuildTarget(com.facebook.buck.model.BuildTarget) Sha1HashCode(com.facebook.buck.util.sha1.Sha1HashCode) PathSourcePath(com.facebook.buck.rules.PathSourcePath) Optional(java.util.Optional) FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) Pattern(java.util.regex.Pattern) CacheStats(com.google.common.cache.CacheStats) Step(com.facebook.buck.step.Step) SourcePath(com.facebook.buck.rules.SourcePath) Either(com.facebook.buck.model.Either) Function(java.util.function.Function) BuildRule(com.facebook.buck.rules.BuildRule) ImmutableList(com.google.common.collect.ImmutableList) NullFileHashCache(com.facebook.buck.util.cache.NullFileHashCache) BuildTargetFactory(com.facebook.buck.model.BuildTargetFactory) Suppliers(com.google.common.base.Suppliers) Nullable(javax.annotation.Nullable) ImmutableSortedSet(com.google.common.collect.ImmutableSortedSet) Matchers(org.hamcrest.Matchers) Test(org.junit.Test) IOException(java.io.IOException) Assert.assertNotEquals(org.junit.Assert.assertNotEquals) StackedFileHashCache(com.facebook.buck.util.cache.StackedFileHashCache) Paths(java.nio.file.Paths) FileHashCache(com.facebook.buck.util.cache.FileHashCache) BuildContext(com.facebook.buck.rules.BuildContext) Preconditions(com.google.common.base.Preconditions) MapMaker(com.google.common.collect.MapMaker) Assert.assertEquals(org.junit.Assert.assertEquals) RuleKey(com.facebook.buck.rules.RuleKey) AddToRuleKey(com.facebook.buck.rules.AddToRuleKey) NoopBuildRule(com.facebook.buck.rules.NoopBuildRule) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) PathSourcePath(com.facebook.buck.rules.PathSourcePath) FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) PathSourcePath(com.facebook.buck.rules.PathSourcePath) SourcePath(com.facebook.buck.rules.SourcePath) StackedFileHashCache(com.facebook.buck.util.cache.StackedFileHashCache) NoopBuildRule(com.facebook.buck.rules.NoopBuildRule) BuildRule(com.facebook.buck.rules.BuildRule) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) ProjectFilesystem(com.facebook.buck.io.ProjectFilesystem) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) RuleKeyAppendable(com.facebook.buck.rules.RuleKeyAppendable) Test(org.junit.Test)

Example 75 with FakeBuildRuleParamsBuilder

use of com.facebook.buck.rules.FakeBuildRuleParamsBuilder in project buck by facebook.

the class InputBasedRuleKeyFactoryTest method ruleKeyChangesIfInputContentsFromBuildTargetSourcePathInRuleKeyAppendableChanges.

@Test
public void ruleKeyChangesIfInputContentsFromBuildTargetSourcePathInRuleKeyAppendableChanges() throws Exception {
    BuildRuleResolver resolver = new BuildRuleResolver(TargetGraph.EMPTY, new DefaultTargetNodeToBuildRuleTransformer());
    SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(resolver);
    SourcePathResolver pathResolver = new SourcePathResolver(ruleFinder);
    final FakeProjectFilesystem filesystem = new FakeProjectFilesystem();
    final BuildRule dep = GenruleBuilder.newGenruleBuilder(BuildTargetFactory.newInstance("//:dep")).setOut("out").build(resolver, filesystem);
    BuildRuleParams params = new FakeBuildRuleParamsBuilder("//:rule").setDeclaredDeps(ImmutableSortedSet.of(dep)).setProjectFilesystem(filesystem).build();
    BuildRule rule = new NoopBuildRule(params) {

        @AddToRuleKey
        RuleKeyAppendableWithInput input = new RuleKeyAppendableWithInput(dep.getSourcePathToOutput());
    };
    // Build a rule key with a particular hash set for the output for the above rule.
    FakeFileHashCache hashCache = new FakeFileHashCache(ImmutableMap.of(pathResolver.getAbsolutePath(Preconditions.checkNotNull(dep.getSourcePathToOutput())), HashCode.fromInt(0)));
    RuleKey inputKey1 = new InputBasedRuleKeyFactory(0, hashCache, pathResolver, ruleFinder).build(rule);
    // Now, build a rule key with a different hash for the output for the above rule.
    hashCache = new FakeFileHashCache(ImmutableMap.of(pathResolver.getAbsolutePath(Preconditions.checkNotNull(dep.getSourcePathToOutput())), HashCode.fromInt(1)));
    RuleKey inputKey2 = new InputBasedRuleKeyFactory(0, hashCache, pathResolver, ruleFinder).build(rule);
    assertThat(inputKey1, Matchers.not(Matchers.equalTo(inputKey2)));
}
Also used : NoopBuildRule(com.facebook.buck.rules.NoopBuildRule) FakeFileHashCache(com.facebook.buck.testutil.FakeFileHashCache) RuleKey(com.facebook.buck.rules.RuleKey) AddToRuleKey(com.facebook.buck.rules.AddToRuleKey) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams) FakeBuildRule(com.facebook.buck.rules.FakeBuildRule) BuildRule(com.facebook.buck.rules.BuildRule) NoopBuildRule(com.facebook.buck.rules.NoopBuildRule) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) Test(org.junit.Test)

Aggregations

FakeBuildRuleParamsBuilder (com.facebook.buck.rules.FakeBuildRuleParamsBuilder)108 BuildRuleResolver (com.facebook.buck.rules.BuildRuleResolver)102 DefaultTargetNodeToBuildRuleTransformer (com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer)102 Test (org.junit.Test)94 SourcePathRuleFinder (com.facebook.buck.rules.SourcePathRuleFinder)87 SourcePathResolver (com.facebook.buck.rules.SourcePathResolver)78 BuildTarget (com.facebook.buck.model.BuildTarget)77 BuildRuleParams (com.facebook.buck.rules.BuildRuleParams)74 FakeSourcePath (com.facebook.buck.rules.FakeSourcePath)50 FakeProjectFilesystem (com.facebook.buck.testutil.FakeProjectFilesystem)32 SourcePath (com.facebook.buck.rules.SourcePath)30 BuildRule (com.facebook.buck.rules.BuildRule)27 Path (java.nio.file.Path)26 ProjectFilesystem (com.facebook.buck.io.ProjectFilesystem)25 FakeBuildRule (com.facebook.buck.rules.FakeBuildRule)22 PathSourcePath (com.facebook.buck.rules.PathSourcePath)18 Step (com.facebook.buck.step.Step)17 RuleKey (com.facebook.buck.rules.RuleKey)16 FakeBuildableContext (com.facebook.buck.rules.FakeBuildableContext)15 ExecutionContext (com.facebook.buck.step.ExecutionContext)14