Search in sources :

Example 6 with MkdirAndSymlinkFileStep

use of com.facebook.buck.step.fs.MkdirAndSymlinkFileStep in project buck by facebook.

the class CopyResourcesStepTest method testAddResourceCommandsWithBuildFileParentOfSrcDirectory.

@Test
public void testAddResourceCommandsWithBuildFileParentOfSrcDirectory() {
    SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(new BuildRuleResolver(TargetGraph.EMPTY, new DefaultTargetNodeToBuildRuleTransformer()));
    SourcePathResolver resolver = new SourcePathResolver(ruleFinder);
    // Files:
    // android/java/BUCK
    // android/java/src/com/facebook/base/data.json
    // android/java/src/com/facebook/common/util/data.json
    ProjectFilesystem filesystem = FakeProjectFilesystem.createJavaOnlyFilesystem();
    BuildTarget buildTarget = BuildTargetFactory.newInstance(filesystem.getRootPath(), "//android/java:resources");
    JavaPackageFinder javaPackageFinder = createJavaPackageFinder();
    CopyResourcesStep step = new CopyResourcesStep(filesystem, resolver, ruleFinder, buildTarget, ImmutableSet.of(new FakeSourcePath(filesystem, "android/java/src/com/facebook/base/data.json"), new FakeSourcePath(filesystem, "android/java/src/com/facebook/common/util/data.json")), filesystem.getBuckPaths().getScratchDir().resolve("android/java/lib__resources__classes"), javaPackageFinder);
    List<? extends Step> expected = ImmutableList.of(new MkdirAndSymlinkFileStep(filesystem, filesystem.resolve("android/java/src/com/facebook/base/data.json"), filesystem.getBuckPaths().getScratchDir().resolve("android/java/lib__resources__classes/com/facebook/base/data.json")), new MkdirAndSymlinkFileStep(filesystem, filesystem.resolve("android/java/src/com/facebook/common/util/data.json"), filesystem.getBuckPaths().getScratchDir().resolve("android/java/lib__resources__classes/com/facebook/common/util/data.json")));
    assertEquals(expected, step.buildSteps());
}
Also used : FakeSourcePath(com.facebook.buck.rules.FakeSourcePath) JavaPackageFinder(com.facebook.buck.jvm.core.JavaPackageFinder) BuildTarget(com.facebook.buck.model.BuildTarget) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) ProjectFilesystem(com.facebook.buck.io.ProjectFilesystem) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) MkdirAndSymlinkFileStep(com.facebook.buck.step.fs.MkdirAndSymlinkFileStep) Test(org.junit.Test)

Example 7 with MkdirAndSymlinkFileStep

use of com.facebook.buck.step.fs.MkdirAndSymlinkFileStep in project buck by facebook.

the class ApkGenruleTest method testCreateAndRunApkGenrule.

@Test
@SuppressWarnings("PMD.AvoidUsingHardCodedIP")
public void testCreateAndRunApkGenrule() throws IOException, NoSuchBuildTargetException {
    ProjectFilesystem projectFilesystem = FakeProjectFilesystem.createJavaOnlyFilesystem();
    FileSystem fileSystem = projectFilesystem.getRootPath().getFileSystem();
    BuildRuleResolver ruleResolver = new BuildRuleResolver(TargetGraph.EMPTY, new DefaultTargetNodeToBuildRuleTransformer());
    createSampleAndroidBinaryRule(ruleResolver, projectFilesystem);
    // From the Python object, create a ApkGenruleBuildRuleFactory to create a ApkGenrule.Builder
    // that builds a ApkGenrule from the Python object.
    BuildTargetParser parser = EasyMock.createNiceMock(BuildTargetParser.class);
    final BuildTarget apkTarget = BuildTargetFactory.newInstance(projectFilesystem.getRootPath(), "//:fb4a");
    EasyMock.expect(parser.parse(EasyMock.eq(":fb4a"), EasyMock.anyObject(BuildTargetPatternParser.class), EasyMock.anyObject())).andStubReturn(apkTarget);
    EasyMock.replay(parser);
    BuildTarget buildTarget = BuildTargetFactory.newInstance(projectFilesystem.getRootPath(), "//src/com/facebook:sign_fb4a");
    ApkGenruleDescription description = new ApkGenruleDescription();
    ApkGenruleDescription.Arg arg = description.createUnpopulatedConstructorArg();
    SourcePathResolver pathResolver = new SourcePathResolver(new SourcePathRuleFinder(ruleResolver));
    arg.apk = new FakeInstallable(apkTarget, pathResolver).getBuildTarget();
    arg.bash = Optional.of("");
    arg.cmd = Optional.of("python signer.py $APK key.properties > $OUT");
    arg.cmdExe = Optional.of("");
    arg.type = Optional.empty();
    arg.out = "signed_fb4a.apk";
    arg.srcs = ImmutableList.of(new PathSourcePath(projectFilesystem, fileSystem.getPath("src/com/facebook/signer.py")), new PathSourcePath(projectFilesystem, fileSystem.getPath("src/com/facebook/key.properties")));
    arg.tests = ImmutableSortedSet.of();
    BuildRuleParams params = new FakeBuildRuleParamsBuilder(buildTarget).setProjectFilesystem(projectFilesystem).build();
    ApkGenrule apkGenrule = (ApkGenrule) description.createBuildRule(TargetGraph.EMPTY, params, ruleResolver, arg);
    ruleResolver.addToIndex(apkGenrule);
    // Verify all of the observers of the Genrule.
    String expectedApkOutput = projectFilesystem.resolve(projectFilesystem.getBuckPaths().getGenDir().toString() + "/src/com/facebook/sign_fb4a/sign_fb4a.apk").toString();
    assertEquals(expectedApkOutput, apkGenrule.getAbsoluteOutputFilePath(pathResolver));
    assertEquals("The apk that this rule is modifying must have the apk in its deps.", ImmutableSet.of(apkTarget.toString()), apkGenrule.getDeps().stream().map(Object::toString).collect(MoreCollectors.toImmutableSet()));
    BuildContext buildContext = FakeBuildContext.withSourcePathResolver(pathResolver);
    Iterable<Path> expectedInputsToCompareToOutputs = ImmutableList.of(fileSystem.getPath("src/com/facebook/signer.py"), fileSystem.getPath("src/com/facebook/key.properties"));
    MoreAsserts.assertIterablesEquals(expectedInputsToCompareToOutputs, pathResolver.filterInputsToCompareToOutput(apkGenrule.getSrcs()));
    // Verify that the shell commands that the genrule produces are correct.
    List<Step> steps = apkGenrule.getBuildSteps(buildContext, new FakeBuildableContext());
    assertEquals(6, steps.size());
    ExecutionContext executionContext = newEmptyExecutionContext();
    Step firstStep = steps.get(0);
    assertTrue(firstStep instanceof MakeCleanDirectoryStep);
    MakeCleanDirectoryStep mkdirCommand = (MakeCleanDirectoryStep) firstStep;
    Path mkdirDir = projectFilesystem.getBuckPaths().getGenDir().resolve("src/com/facebook/sign_fb4a");
    assertEquals("First command should make sure the output directory exists and is empty.", mkdirDir, mkdirCommand.getPath());
    Step secondStep = steps.get(1);
    assertTrue(secondStep instanceof MakeCleanDirectoryStep);
    MakeCleanDirectoryStep secondMkdirCommand = (MakeCleanDirectoryStep) secondStep;
    Path relativePathToTmpDir = projectFilesystem.getBuckPaths().getGenDir().resolve("src/com/facebook/sign_fb4a__tmp");
    assertEquals("Second command should make sure the temp directory exists.", relativePathToTmpDir, secondMkdirCommand.getPath());
    Step thirdStep = steps.get(2);
    assertTrue(thirdStep instanceof MakeCleanDirectoryStep);
    MakeCleanDirectoryStep thirdMkdirCommand = (MakeCleanDirectoryStep) thirdStep;
    Path relativePathToSrcDir = projectFilesystem.getBuckPaths().getGenDir().resolve("src/com/facebook/sign_fb4a__srcs");
    assertEquals("Third command should make sure the temp directory exists.", relativePathToSrcDir, thirdMkdirCommand.getPath());
    MkdirAndSymlinkFileStep linkSource1 = (MkdirAndSymlinkFileStep) steps.get(3);
    assertEquals(fileSystem.getPath("src/com/facebook/signer.py"), linkSource1.getSource());
    assertEquals(fileSystem.getPath(relativePathToSrcDir + "/signer.py"), linkSource1.getTarget());
    MkdirAndSymlinkFileStep linkSource2 = (MkdirAndSymlinkFileStep) steps.get(4);
    assertEquals(fileSystem.getPath("src/com/facebook/key.properties"), linkSource2.getSource());
    assertEquals(fileSystem.getPath(relativePathToSrcDir + "/key.properties"), linkSource2.getTarget());
    Step sixthStep = steps.get(5);
    assertTrue(sixthStep instanceof AbstractGenruleStep);
    AbstractGenruleStep genruleCommand = (AbstractGenruleStep) sixthStep;
    assertEquals("genrule", genruleCommand.getShortName());
    ImmutableMap<String, String> environmentVariables = genruleCommand.getEnvironmentVariables(executionContext);
    assertEquals(new ImmutableMap.Builder<String, String>().put("APK", projectFilesystem.resolve(BuildTargets.getGenPath(projectFilesystem, apkTarget, "%s.apk")).toString()).put("OUT", expectedApkOutput).build(), environmentVariables);
    Path scriptFilePath = genruleCommand.getScriptFilePath(executionContext);
    String scriptFileContents = genruleCommand.getScriptFileContents(executionContext);
    assertEquals(ImmutableList.of("/bin/bash", "-e", scriptFilePath.toString()), genruleCommand.getShellCommand(executionContext));
    assertEquals("python signer.py $APK key.properties > $OUT", scriptFileContents);
    EasyMock.verify(parser);
}
Also used : KeystoreBuilder(com.facebook.buck.jvm.java.KeystoreBuilder) JavaLibraryBuilder(com.facebook.buck.jvm.java.JavaLibraryBuilder) FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) Step(com.facebook.buck.step.Step) MkdirAndSymlinkFileStep(com.facebook.buck.step.fs.MkdirAndSymlinkFileStep) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) AbstractGenruleStep(com.facebook.buck.shell.AbstractGenruleStep) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) BuildTarget(com.facebook.buck.model.BuildTarget) FileSystem(java.nio.file.FileSystem) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) ProjectFilesystem(com.facebook.buck.io.ProjectFilesystem) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) MkdirAndSymlinkFileStep(com.facebook.buck.step.fs.MkdirAndSymlinkFileStep) FakeSourcePath(com.facebook.buck.rules.FakeSourcePath) Path(java.nio.file.Path) PathSourcePath(com.facebook.buck.rules.PathSourcePath) FakeBuildableContext(com.facebook.buck.rules.FakeBuildableContext) BuildTargetParser(com.facebook.buck.parser.BuildTargetParser) PathSourcePath(com.facebook.buck.rules.PathSourcePath) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) AbstractGenruleStep(com.facebook.buck.shell.AbstractGenruleStep) ExecutionContext(com.facebook.buck.step.ExecutionContext) TestExecutionContext(com.facebook.buck.step.TestExecutionContext) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams) FakeBuildContext(com.facebook.buck.rules.FakeBuildContext) BuildContext(com.facebook.buck.rules.BuildContext) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) BuildTargetPatternParser(com.facebook.buck.parser.BuildTargetPatternParser) Test(org.junit.Test)

Example 8 with MkdirAndSymlinkFileStep

use of com.facebook.buck.step.fs.MkdirAndSymlinkFileStep in project buck by facebook.

the class GenruleTest method testCreateAndRunGenrule.

@Test
public void testCreateAndRunGenrule() throws IOException, NoSuchBuildTargetException {
    /*
     * Programmatically build up a Genrule that corresponds to:
     *
     * genrule(
     *   name = 'katana_manifest',
     *   srcs = [
     *     'convert_to_katana.py',
     *     'AndroidManifest.xml',
     *   ],
     *   cmd = 'python $SRCDIR/* > $OUT',
     *   out = 'AndroidManifest.xml',
     * )
     */
    BuildRuleResolver ruleResolver = new BuildRuleResolver(TargetGraph.EMPTY, new DefaultTargetNodeToBuildRuleTransformer());
    SourcePathResolver pathResolver = new SourcePathResolver(new SourcePathRuleFinder(ruleResolver));
    createSampleJavaBinaryRule(ruleResolver);
    // From the Python object, create a GenruleBuildRuleFactory to create a Genrule.Builder
    // that builds a Genrule from the Python object.
    //    BuildTargetParser parser = BuildTargetParser.INSTANCE;
    //    EasyMock.expect(parser.parse(EasyMock.eq("//java/com/facebook/util:util"),
    //        EasyMock.anyObject(BuildTargetPatternParser.class)))
    //        .andStubReturn(BuildTargetFactory.newInstance("//java/com/facebook/util:util"));
    //    EasyMock.replay(parser);
    BuildTarget buildTarget = BuildTargetFactory.newInstance(filesystem.getRootPath(), "//src/com/facebook/katana:katana_manifest");
    BuildRule genrule = GenruleBuilder.newGenruleBuilder(buildTarget).setBash("python convert_to_katana.py AndroidManifest.xml > $OUT").setCmdExe("python convert_to_katana.py AndroidManifest.xml > %OUT%").setOut("AndroidManifest.xml").setSrcs(ImmutableList.of(new PathSourcePath(filesystem, filesystem.getPath("src/com/facebook/katana/convert_to_katana.py")), new PathSourcePath(filesystem, filesystem.getPath("src/com/facebook/katana/AndroidManifest.xml")))).build(ruleResolver, filesystem);
    // Verify all of the observers of the Genrule.
    assertEquals(filesystem.getBuckPaths().getGenDir().resolve("src/com/facebook/katana/katana_manifest/AndroidManifest.xml"), pathResolver.getRelativePath(genrule.getSourcePathToOutput()));
    assertEquals(filesystem.resolve(filesystem.getBuckPaths().getGenDir().resolve("src/com/facebook/katana/katana_manifest/AndroidManifest.xml")).toString(), ((Genrule) genrule).getAbsoluteOutputFilePath(pathResolver));
    BuildContext buildContext = FakeBuildContext.withSourcePathResolver(pathResolver);
    ImmutableList<Path> inputsToCompareToOutputs = ImmutableList.of(filesystem.getPath("src/com/facebook/katana/convert_to_katana.py"), filesystem.getPath("src/com/facebook/katana/AndroidManifest.xml"));
    assertEquals(inputsToCompareToOutputs, pathResolver.filterInputsToCompareToOutput(((Genrule) genrule).getSrcs()));
    // Verify that the shell commands that the genrule produces are correct.
    List<Step> steps = genrule.getBuildSteps(buildContext, new FakeBuildableContext());
    assertEquals(6, steps.size());
    ExecutionContext executionContext = newEmptyExecutionContext();
    Step firstStep = steps.get(0);
    assertTrue(firstStep instanceof MakeCleanDirectoryStep);
    MakeCleanDirectoryStep mkdirCommand = (MakeCleanDirectoryStep) firstStep;
    Path pathToOutDir = filesystem.getBuckPaths().getGenDir().resolve("src/com/facebook/katana/katana_manifest");
    assertEquals("First command should make sure the output directory exists and is empty.", pathToOutDir, mkdirCommand.getPath());
    Step mkTmpDir = steps.get(1);
    assertTrue(mkTmpDir instanceof MakeCleanDirectoryStep);
    MakeCleanDirectoryStep secondMkdirCommand = (MakeCleanDirectoryStep) mkTmpDir;
    Path pathToTmpDir = filesystem.getBuckPaths().getGenDir().resolve("src/com/facebook/katana/katana_manifest__tmp");
    assertEquals("Second command should create the temp directory to be written by the genrule.", pathToTmpDir, secondMkdirCommand.getPath());
    Step mkSrcDir = steps.get(2);
    assertTrue(mkSrcDir instanceof MakeCleanDirectoryStep);
    MakeCleanDirectoryStep thirdMkdirCommand = (MakeCleanDirectoryStep) mkTmpDir;
    Path pathToSrcDir = filesystem.getBuckPaths().getGenDir().resolve("src/com/facebook/katana/katana_manifest__srcs");
    assertEquals("Third command should create the temp source directory to be written by the genrule.", pathToTmpDir, thirdMkdirCommand.getPath());
    MkdirAndSymlinkFileStep linkSource1 = (MkdirAndSymlinkFileStep) steps.get(3);
    assertEquals(filesystem.getPath("src/com/facebook/katana/convert_to_katana.py"), linkSource1.getSource());
    assertEquals(filesystem.getPath(pathToSrcDir + "/convert_to_katana.py"), linkSource1.getTarget());
    MkdirAndSymlinkFileStep linkSource2 = (MkdirAndSymlinkFileStep) steps.get(4);
    assertEquals(filesystem.getPath("src/com/facebook/katana/AndroidManifest.xml"), linkSource2.getSource());
    assertEquals(filesystem.getPath(pathToSrcDir + "/AndroidManifest.xml"), linkSource2.getTarget());
    Step sixthStep = steps.get(5);
    assertTrue(sixthStep instanceof AbstractGenruleStep);
    AbstractGenruleStep genruleCommand = (AbstractGenruleStep) sixthStep;
    assertEquals("genrule", genruleCommand.getShortName());
    assertEquals(ImmutableMap.<String, String>builder().put("OUT", filesystem.resolve(filesystem.getBuckPaths().getGenDir().resolve("src/com/facebook/katana/katana_manifest/AndroidManifest.xml")).toString()).build(), genruleCommand.getEnvironmentVariables(executionContext));
    Path scriptFilePath = genruleCommand.getScriptFilePath(executionContext);
    String scriptFileContents = genruleCommand.getScriptFileContents(executionContext);
    if (Platform.detect() == Platform.WINDOWS) {
        assertEquals(ImmutableList.of(scriptFilePath.toString()), genruleCommand.getShellCommand(executionContext));
        assertEquals("python convert_to_katana.py AndroidManifest.xml > %OUT%", scriptFileContents);
    } else {
        assertEquals(ImmutableList.of("/bin/bash", "-e", scriptFilePath.toString()), genruleCommand.getShellCommand(executionContext));
        assertEquals("python convert_to_katana.py AndroidManifest.xml > $OUT", scriptFileContents);
    }
}
Also used : Path(java.nio.file.Path) PathSourcePath(com.facebook.buck.rules.PathSourcePath) FakeSourcePath(com.facebook.buck.rules.FakeSourcePath) FakeBuildableContext(com.facebook.buck.rules.FakeBuildableContext) PathSourcePath(com.facebook.buck.rules.PathSourcePath) MkdirAndSymlinkFileStep(com.facebook.buck.step.fs.MkdirAndSymlinkFileStep) Step(com.facebook.buck.step.Step) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) 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) FakeBuildContext(com.facebook.buck.rules.FakeBuildContext) BuildContext(com.facebook.buck.rules.BuildContext) BuildTarget(com.facebook.buck.model.BuildTarget) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) BuildRule(com.facebook.buck.rules.BuildRule) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) MkdirAndSymlinkFileStep(com.facebook.buck.step.fs.MkdirAndSymlinkFileStep) Test(org.junit.Test)

Example 9 with MkdirAndSymlinkFileStep

use of com.facebook.buck.step.fs.MkdirAndSymlinkFileStep in project buck by facebook.

the class GenruleTest method ensureFilesInSubdirectoriesAreKeptInSubDirectories.

@Test
public void ensureFilesInSubdirectoriesAreKeptInSubDirectories() throws Exception {
    ProjectFilesystem projectFilesystem = new FakeProjectFilesystem();
    BuildRuleResolver resolver = new BuildRuleResolver(TargetGraph.EMPTY, new DefaultTargetNodeToBuildRuleTransformer());
    SourcePathResolver pathResolver = new SourcePathResolver(new SourcePathRuleFinder(resolver));
    BuildTarget target = BuildTargetFactory.newInstance("//:example");
    BuildRule rule = GenruleBuilder.newGenruleBuilder(target).setBash("ignored").setSrcs(ImmutableList.of(new PathSourcePath(projectFilesystem, Paths.get("in-dir.txt")), new PathSourcePath(projectFilesystem, Paths.get("foo/bar.html")), new PathSourcePath(projectFilesystem, Paths.get("other/place.txt")))).setOut("example-file").build(resolver);
    ImmutableList.Builder<Step> builder = ImmutableList.builder();
    ((Genrule) rule).addSymlinkCommands(FakeBuildContext.withSourcePathResolver(pathResolver), builder);
    ImmutableList<Step> commands = builder.build();
    String baseTmpPath = projectFilesystem.getBuckPaths().getGenDir().toString() + "/example__srcs/";
    assertEquals(3, commands.size());
    MkdirAndSymlinkFileStep linkCmd = (MkdirAndSymlinkFileStep) commands.get(0);
    assertEquals(Paths.get("in-dir.txt"), linkCmd.getSource());
    assertEquals(Paths.get(baseTmpPath + "in-dir.txt"), linkCmd.getTarget());
    linkCmd = (MkdirAndSymlinkFileStep) commands.get(1);
    assertEquals(Paths.get("foo/bar.html"), linkCmd.getSource());
    assertEquals(Paths.get(baseTmpPath + "foo/bar.html"), linkCmd.getTarget());
    linkCmd = (MkdirAndSymlinkFileStep) commands.get(2);
    assertEquals(Paths.get("other/place.txt"), linkCmd.getSource());
    assertEquals(Paths.get(baseTmpPath + "other/place.txt"), linkCmd.getTarget());
}
Also used : FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) ImmutableList(com.google.common.collect.ImmutableList) PathSourcePath(com.facebook.buck.rules.PathSourcePath) MkdirAndSymlinkFileStep(com.facebook.buck.step.fs.MkdirAndSymlinkFileStep) Step(com.facebook.buck.step.Step) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) BuildTarget(com.facebook.buck.model.BuildTarget) BuildRule(com.facebook.buck.rules.BuildRule) FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) ProjectFilesystem(com.facebook.buck.io.ProjectFilesystem) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) MkdirAndSymlinkFileStep(com.facebook.buck.step.fs.MkdirAndSymlinkFileStep) Test(org.junit.Test)

Aggregations

MkdirAndSymlinkFileStep (com.facebook.buck.step.fs.MkdirAndSymlinkFileStep)9 BuildTarget (com.facebook.buck.model.BuildTarget)7 BuildRuleResolver (com.facebook.buck.rules.BuildRuleResolver)6 DefaultTargetNodeToBuildRuleTransformer (com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer)6 SourcePathResolver (com.facebook.buck.rules.SourcePathResolver)6 SourcePathRuleFinder (com.facebook.buck.rules.SourcePathRuleFinder)6 Test (org.junit.Test)6 ProjectFilesystem (com.facebook.buck.io.ProjectFilesystem)5 FakeSourcePath (com.facebook.buck.rules.FakeSourcePath)5 Step (com.facebook.buck.step.Step)5 FakeProjectFilesystem (com.facebook.buck.testutil.FakeProjectFilesystem)5 Path (java.nio.file.Path)5 PathSourcePath (com.facebook.buck.rules.PathSourcePath)4 MakeCleanDirectoryStep (com.facebook.buck.step.fs.MakeCleanDirectoryStep)4 JavaPackageFinder (com.facebook.buck.jvm.core.JavaPackageFinder)3 BuildRule (com.facebook.buck.rules.BuildRule)3 SourcePath (com.facebook.buck.rules.SourcePath)3 ImmutableList (com.google.common.collect.ImmutableList)3 BuildContext (com.facebook.buck.rules.BuildContext)2 ExplicitBuildTargetSourcePath (com.facebook.buck.rules.ExplicitBuildTargetSourcePath)2