Search in sources :

Example 11 with MakeCleanDirectoryStep

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

the class MultiarchFile method copyLinkMaps.

private void copyLinkMaps(BuildableContext buildableContext, ImmutableList.Builder<Step> steps) {
    Path linkMapDir = Paths.get(output + "-LinkMap");
    steps.add(new MakeCleanDirectoryStep(getProjectFilesystem(), linkMapDir));
    for (SourcePath thinBinary : thinBinaries) {
        Optional<BuildRule> maybeRule = ruleFinder.getRule(thinBinary);
        if (maybeRule.isPresent()) {
            BuildRule rule = maybeRule.get();
            if (rule instanceof CxxBinary) {
                rule = ((CxxBinary) rule).getLinkRule();
            }
            if (rule instanceof CxxLink && !rule.getBuildTarget().getFlavors().contains(LinkerMapMode.NO_LINKER_MAP.getFlavor())) {
                Optional<Path> maybeLinkerMapPath = ((CxxLink) rule).getLinkerMapPath();
                if (maybeLinkerMapPath.isPresent()) {
                    Path source = maybeLinkerMapPath.get();
                    Path dest = linkMapDir.resolve(source.getFileName());
                    steps.add(CopyStep.forFile(getProjectFilesystem(), source, dest));
                    buildableContext.recordArtifact(dest);
                }
            }
        }
    }
}
Also used : SourcePath(com.facebook.buck.rules.SourcePath) Path(java.nio.file.Path) ExplicitBuildTargetSourcePath(com.facebook.buck.rules.ExplicitBuildTargetSourcePath) SourcePath(com.facebook.buck.rules.SourcePath) ExplicitBuildTargetSourcePath(com.facebook.buck.rules.ExplicitBuildTargetSourcePath) CxxBinary(com.facebook.buck.cxx.CxxBinary) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) BuildRule(com.facebook.buck.rules.BuildRule) AbstractBuildRule(com.facebook.buck.rules.AbstractBuildRule) CxxLink(com.facebook.buck.cxx.CxxLink)

Example 12 with MakeCleanDirectoryStep

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

the class SceneKitAssets method getBuildSteps.

@Override
public ImmutableList<Step> getBuildSteps(BuildContext context, BuildableContext buildableContext) {
    ImmutableList.Builder<Step> stepsBuilder = ImmutableList.builder();
    stepsBuilder.add(new MakeCleanDirectoryStep(getProjectFilesystem(), outputDir));
    for (SourcePath inputPath : sceneKitAssetsPaths) {
        final Path absoluteInputPath = context.getSourcePathResolver().getAbsolutePath(inputPath);
        if (copySceneKitAssets.isPresent()) {
            stepsBuilder.add(new ShellStep(getProjectFilesystem().getRootPath()) {

                @Override
                protected ImmutableList<String> getShellCommandInternal(ExecutionContext executionContext) {
                    ImmutableList.Builder<String> commandBuilder = ImmutableList.builder();
                    commandBuilder.addAll(copySceneKitAssets.get().getCommandPrefix(context.getSourcePathResolver()));
                    commandBuilder.add(absoluteInputPath.toString(), "-o", getProjectFilesystem().resolve(outputDir).resolve(absoluteInputPath.getFileName()).toString(), "--target-platform=" + sdkName, "--target-version=" + minOSVersion);
                    return commandBuilder.build();
                }

                @Override
                public ImmutableMap<String, String> getEnvironmentVariables(ExecutionContext executionContext) {
                    return copySceneKitAssets.get().getEnvironment(context.getSourcePathResolver());
                }

                @Override
                public String getShortName() {
                    return "copy-scenekit-assets";
                }
            });
        } else {
            stepsBuilder.add(CopyStep.forDirectory(getProjectFilesystem(), absoluteInputPath, outputDir, CopyStep.DirectoryMode.CONTENTS_ONLY));
        }
    }
    buildableContext.recordArtifact(context.getSourcePathResolver().getRelativePath(getSourcePathToOutput()));
    return stepsBuilder.build();
}
Also used : ExplicitBuildTargetSourcePath(com.facebook.buck.rules.ExplicitBuildTargetSourcePath) SourcePath(com.facebook.buck.rules.SourcePath) ExplicitBuildTargetSourcePath(com.facebook.buck.rules.ExplicitBuildTargetSourcePath) SourcePath(com.facebook.buck.rules.SourcePath) Path(java.nio.file.Path) ExecutionContext(com.facebook.buck.step.ExecutionContext) ImmutableList(com.google.common.collect.ImmutableList) ShellStep(com.facebook.buck.shell.ShellStep) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) Step(com.facebook.buck.step.Step) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) CopyStep(com.facebook.buck.step.fs.CopyStep) ShellStep(com.facebook.buck.shell.ShellStep) ImmutableMap(com.google.common.collect.ImmutableMap)

Example 13 with MakeCleanDirectoryStep

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

the class TestRunning method runTests.

@SuppressWarnings("PMD.EmptyCatchBlock")
public static int runTests(final CommandRunnerParams params, Iterable<TestRule> tests, ExecutionContext executionContext, final TestRunningOptions options, ListeningExecutorService service, BuildEngine buildEngine, final StepRunner stepRunner, SourcePathResolver sourcePathResolver, SourcePathRuleFinder ruleFinder) throws IOException, ExecutionException, InterruptedException {
    ImmutableSet<JavaLibrary> rulesUnderTestForCoverage;
    // If needed, we first run instrumentation on the class files.
    if (options.isCodeCoverageEnabled()) {
        rulesUnderTestForCoverage = getRulesUnderTest(tests);
        if (!rulesUnderTestForCoverage.isEmpty()) {
            try {
                // We'll use the filesystem of the first rule under test. This will fail if there are any
                // tests from a different repo, but it'll help us bootstrap ourselves to being able to
                // support multiple repos
                // TODO(t8220837): Support tests in multiple repos
                JavaLibrary library = rulesUnderTestForCoverage.iterator().next();
                stepRunner.runStepForBuildTarget(executionContext, new MakeCleanDirectoryStep(library.getProjectFilesystem(), JacocoConstants.getJacocoOutputDir(library.getProjectFilesystem())), Optional.empty());
            } catch (StepFailedException e) {
                params.getBuckEventBus().post(ConsoleEvent.severe(Throwables.getRootCause(e).getLocalizedMessage()));
                return 1;
            }
        }
    } else {
        rulesUnderTestForCoverage = ImmutableSet.of();
    }
    final ImmutableSet<String> testTargets = FluentIterable.from(tests).transform(BuildRule::getBuildTarget).transform(Object::toString).toSet();
    final int totalNumberOfTests = Iterables.size(tests);
    params.getBuckEventBus().post(TestRunEvent.started(options.isRunAllTests(), options.getTestSelectorList(), options.shouldExplainTestSelectorList(), testTargets));
    // Start running all of the tests. The result of each java_test() rule is represented as a
    // ListenableFuture.
    List<ListenableFuture<TestResults>> results = Lists.newArrayList();
    TestRuleKeyFileHelper testRuleKeyFileHelper = new TestRuleKeyFileHelper(buildEngine);
    final AtomicInteger lastReportedTestSequenceNumber = new AtomicInteger();
    final List<TestRun> separateTestRuns = Lists.newArrayList();
    List<TestRun> parallelTestRuns = Lists.newArrayList();
    for (final TestRule test : tests) {
        // Determine whether the test needs to be executed.
        final Callable<TestResults> resultsInterpreter = getCachingCallable(test.interpretTestResults(executionContext, /*isUsingTestSelectors*/
        !options.getTestSelectorList().isEmpty()));
        boolean isTestRunRequired;
        isTestRunRequired = isTestRunRequiredForTest(test, buildEngine, executionContext, testRuleKeyFileHelper, options.getTestResultCacheMode(), resultsInterpreter, !options.getTestSelectorList().isEmpty(), !options.getEnvironmentOverrides().isEmpty());
        final Map<String, UUID> testUUIDMap = new HashMap<>();
        final AtomicReference<TestStatusMessageEvent.Started> currentTestStatusMessageEvent = new AtomicReference<>();
        TestRule.TestReportingCallback testReportingCallback = new TestRule.TestReportingCallback() {

            @Override
            public void testsDidBegin() {
                LOG.debug("Tests for rule %s began", test.getBuildTarget());
            }

            @Override
            public void statusDidBegin(TestStatusMessage didBeginMessage) {
                LOG.debug("Test status did begin: %s", didBeginMessage);
                TestStatusMessageEvent.Started startedEvent = TestStatusMessageEvent.started(didBeginMessage);
                TestStatusMessageEvent.Started previousEvent = currentTestStatusMessageEvent.getAndSet(startedEvent);
                Preconditions.checkState(previousEvent == null, "Received begin status before end status (%s)", previousEvent);
                params.getBuckEventBus().post(startedEvent);
                String message = didBeginMessage.getMessage();
                if (message.toLowerCase().contains("debugger")) {
                    executionContext.getStdErr().println(executionContext.getAnsi().asWarningText(message));
                }
            }

            @Override
            public void statusDidEnd(TestStatusMessage didEndMessage) {
                LOG.debug("Test status did end: %s", didEndMessage);
                TestStatusMessageEvent.Started previousEvent = currentTestStatusMessageEvent.getAndSet(null);
                Preconditions.checkState(previousEvent != null, "Received end status before begin status (%s)", previousEvent);
                params.getBuckEventBus().post(TestStatusMessageEvent.finished(previousEvent, didEndMessage));
            }

            @Override
            public void testDidBegin(String testCaseName, String testName) {
                LOG.debug("Test rule %s test case %s test name %s began", test.getBuildTarget(), testCaseName, testName);
                UUID testUUID = UUID.randomUUID();
                // UUID is immutable and thread-safe as of Java 7, so it's
                // safe to stash in a map and use later:
                //
                // http://bugs.java.com/view_bug.do?bug_id=6611830
                testUUIDMap.put(testCaseName + ":" + testName, testUUID);
                params.getBuckEventBus().post(TestSummaryEvent.started(testUUID, testCaseName, testName));
            }

            @Override
            public void testDidEnd(TestResultSummary testResultSummary) {
                LOG.debug("Test rule %s test did end: %s", test.getBuildTarget(), testResultSummary);
                UUID testUUID = testUUIDMap.get(testResultSummary.getTestCaseName() + ":" + testResultSummary.getTestName());
                Preconditions.checkNotNull(testUUID);
                params.getBuckEventBus().post(TestSummaryEvent.finished(testUUID, testResultSummary));
            }

            @Override
            public void testsDidEnd(List<TestCaseSummary> testCaseSummaries) {
                LOG.debug("Test rule %s tests did end: %s", test.getBuildTarget(), testCaseSummaries);
            }
        };
        List<Step> steps;
        if (isTestRunRequired) {
            params.getBuckEventBus().post(IndividualTestEvent.started(testTargets));
            ImmutableList.Builder<Step> stepsBuilder = ImmutableList.builder();
            Preconditions.checkState(buildEngine.isRuleBuilt(test.getBuildTarget()));
            List<Step> testSteps = test.runTests(executionContext, options, sourcePathResolver, testReportingCallback);
            if (!testSteps.isEmpty()) {
                stepsBuilder.addAll(testSteps);
                stepsBuilder.add(testRuleKeyFileHelper.createRuleKeyInDirStep(test));
            }
            steps = stepsBuilder.build();
        } else {
            steps = ImmutableList.of();
        }
        TestRun testRun = TestRun.of(test, steps, getStatusTransformingCallable(isTestRunRequired, resultsInterpreter), testReportingCallback);
        // commands because the rule is cached, but its results must still be processed.
        if (test.runTestSeparately()) {
            LOG.debug("Running test %s in serial", test);
            separateTestRuns.add(testRun);
        } else {
            LOG.debug("Running test %s in parallel", test);
            parallelTestRuns.add(testRun);
        }
    }
    for (TestRun testRun : parallelTestRuns) {
        ListenableFuture<TestResults> testResults = runStepsAndYieldResult(stepRunner, executionContext, testRun.getSteps(), testRun.getTestResultsCallable(), testRun.getTest().getBuildTarget(), params.getBuckEventBus(), service);
        results.add(transformTestResults(params, testResults, testRun.getTest(), testRun.getTestReportingCallback(), testTargets, lastReportedTestSequenceNumber, totalNumberOfTests));
    }
    ListenableFuture<List<TestResults>> parallelTestStepsFuture = Futures.allAsList(results);
    final List<TestResults> completedResults = Lists.newArrayList();
    final ListeningExecutorService directExecutorService = MoreExecutors.newDirectExecutorService();
    ListenableFuture<Void> uberFuture = MoreFutures.addListenableCallback(parallelTestStepsFuture, new FutureCallback<List<TestResults>>() {

        @Override
        public void onSuccess(List<TestResults> parallelTestResults) {
            LOG.debug("Parallel tests completed, running separate tests...");
            completedResults.addAll(parallelTestResults);
            List<ListenableFuture<TestResults>> separateResultsList = Lists.newArrayList();
            for (TestRun testRun : separateTestRuns) {
                separateResultsList.add(transformTestResults(params, runStepsAndYieldResult(stepRunner, executionContext, testRun.getSteps(), testRun.getTestResultsCallable(), testRun.getTest().getBuildTarget(), params.getBuckEventBus(), directExecutorService), testRun.getTest(), testRun.getTestReportingCallback(), testTargets, lastReportedTestSequenceNumber, totalNumberOfTests));
            }
            ListenableFuture<List<TestResults>> serialResults = Futures.allAsList(separateResultsList);
            try {
                completedResults.addAll(serialResults.get());
            } catch (ExecutionException e) {
                LOG.error(e, "Error fetching serial test results");
                throw new HumanReadableException(e, "Error fetching serial test results");
            } catch (InterruptedException e) {
                LOG.error(e, "Interrupted fetching serial test results");
                try {
                    serialResults.cancel(true);
                } catch (CancellationException ignored) {
                // Rethrow original InterruptedException instead.
                }
                Thread.currentThread().interrupt();
                throw new HumanReadableException(e, "Test cancelled");
            }
            LOG.debug("Done running serial tests.");
        }

        @Override
        public void onFailure(Throwable e) {
            LOG.error(e, "Parallel tests failed, not running serial tests");
            throw new HumanReadableException(e, "Parallel tests failed");
        }
    }, directExecutorService);
    try {
        // Block until all the tests have finished running.
        uberFuture.get();
    } catch (ExecutionException e) {
        e.printStackTrace(params.getConsole().getStdErr());
        return 1;
    } catch (InterruptedException e) {
        try {
            uberFuture.cancel(true);
        } catch (CancellationException ignored) {
        // Rethrow original InterruptedException instead.
        }
        Thread.currentThread().interrupt();
        throw e;
    }
    params.getBuckEventBus().post(TestRunEvent.finished(testTargets, completedResults));
    // Write out the results as XML, if requested.
    Optional<String> path = options.getPathToXmlTestOutput();
    if (path.isPresent()) {
        try (Writer writer = Files.newWriter(new File(path.get()), Charsets.UTF_8)) {
            writeXmlOutput(completedResults, writer);
        }
    }
    // Generate the code coverage report.
    if (options.isCodeCoverageEnabled() && !rulesUnderTestForCoverage.isEmpty()) {
        try {
            JavaBuckConfig javaBuckConfig = params.getBuckConfig().getView(JavaBuckConfig.class);
            DefaultJavaPackageFinder defaultJavaPackageFinder = javaBuckConfig.createDefaultJavaPackageFinder();
            stepRunner.runStepForBuildTarget(executionContext, getReportCommand(rulesUnderTestForCoverage, defaultJavaPackageFinder, javaBuckConfig.getDefaultJavaOptions().getJavaRuntimeLauncher(), params.getCell().getFilesystem(), sourcePathResolver, ruleFinder, JacocoConstants.getJacocoOutputDir(params.getCell().getFilesystem()), options.getCoverageReportFormat(), options.getCoverageReportTitle(), javaBuckConfig.getDefaultJavacOptions().getSpoolMode() == JavacOptions.SpoolMode.INTERMEDIATE_TO_DISK, options.getCoverageIncludes(), options.getCoverageExcludes()), Optional.empty());
        } catch (StepFailedException e) {
            params.getBuckEventBus().post(ConsoleEvent.severe(Throwables.getRootCause(e).getLocalizedMessage()));
            return 1;
        }
    }
    boolean failures = Iterables.any(completedResults, results1 -> {
        LOG.debug("Checking result %s for failure", results1);
        return !results1.isSuccess();
    });
    return failures ? TEST_FAILURES_EXIT_CODE : 0;
}
Also used : HashMap(java.util.HashMap) TestResults(com.facebook.buck.test.TestResults) JavaBuckConfig(com.facebook.buck.jvm.java.JavaBuckConfig) DefaultJavaPackageFinder(com.facebook.buck.jvm.java.DefaultJavaPackageFinder) StepFailedException(com.facebook.buck.step.StepFailedException) BuildRule(com.facebook.buck.rules.BuildRule) List(java.util.List) ImmutableList(com.google.common.collect.ImmutableList) UUID(java.util.UUID) TestResultSummary(com.facebook.buck.test.TestResultSummary) TestRule(com.facebook.buck.rules.TestRule) TestStatusMessageEvent(com.facebook.buck.rules.TestStatusMessageEvent) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) CancellationException(java.util.concurrent.CancellationException) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) ListeningExecutorService(com.google.common.util.concurrent.ListeningExecutorService) File(java.io.File) ImmutableList(com.google.common.collect.ImmutableList) Step(com.facebook.buck.step.Step) GenerateCodeCoverageReportStep(com.facebook.buck.jvm.java.GenerateCodeCoverageReportStep) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) ExecutionException(java.util.concurrent.ExecutionException) AtomicReference(java.util.concurrent.atomic.AtomicReference) TestStatusMessage(com.facebook.buck.test.TestStatusMessage) JavaLibrary(com.facebook.buck.jvm.java.JavaLibrary) DefaultJavaLibrary(com.facebook.buck.jvm.java.DefaultJavaLibrary) HumanReadableException(com.facebook.buck.util.HumanReadableException) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) PrintWriter(java.io.PrintWriter) Writer(java.io.Writer) StringWriter(java.io.StringWriter)

Example 14 with MakeCleanDirectoryStep

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

the class HaskellCompileRule method getBuildSteps.

@Override
public ImmutableList<Step> getBuildSteps(BuildContext buildContext, BuildableContext buildableContext) {
    buildableContext.recordArtifact(getObjectDir());
    buildableContext.recordArtifact(getInterfaceDir());
    buildableContext.recordArtifact(getStubDir());
    return ImmutableList.of(new MakeCleanDirectoryStep(getProjectFilesystem(), getObjectDir()), new MakeCleanDirectoryStep(getProjectFilesystem(), getInterfaceDir()), new MakeCleanDirectoryStep(getProjectFilesystem(), getStubDir()), new ShellStep(getProjectFilesystem().getRootPath()) {

        @Override
        public ImmutableMap<String, String> getEnvironmentVariables(ExecutionContext context) {
            return ImmutableMap.<String, String>builder().putAll(super.getEnvironmentVariables(context)).putAll(compiler.getEnvironment(buildContext.getSourcePathResolver())).build();
        }

        @Override
        protected ImmutableList<String> getShellCommandInternal(ExecutionContext context) {
            SourcePathResolver resolver = buildContext.getSourcePathResolver();
            return ImmutableList.<String>builder().addAll(compiler.getCommandPrefix(resolver)).addAll(flags).add("-no-link").addAll(picType == CxxSourceRuleFactory.PicType.PIC ? ImmutableList.of("-dynamic", "-fPIC", "-hisuf", "dyn_hi") : ImmutableList.of()).addAll(MoreIterables.zipAndConcat(Iterables.cycle("-main-is"), OptionalCompat.asSet(main))).addAll(getPackageNameArgs()).addAll(getPreprocessorFlags(buildContext.getSourcePathResolver())).add("-odir", getProjectFilesystem().resolve(getObjectDir()).toString()).add("-hidir", getProjectFilesystem().resolve(getInterfaceDir()).toString()).add("-stubdir", getProjectFilesystem().resolve(getStubDir()).toString()).add("-i" + includes.stream().map(resolver::getAbsolutePath).map(Object::toString).collect(Collectors.joining(":"))).addAll(getPackageArgs(buildContext.getSourcePathResolver())).addAll(sources.getSourcePaths().stream().map(resolver::getAbsolutePath).map(Object::toString).iterator()).build();
        }

        @Override
        public String getShortName() {
            return "haskell-compile";
        }
    });
}
Also used : ExecutionContext(com.facebook.buck.step.ExecutionContext) ImmutableList(com.google.common.collect.ImmutableList) ShellStep(com.facebook.buck.shell.ShellStep) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) ImmutableMap(com.google.common.collect.ImmutableMap)

Example 15 with MakeCleanDirectoryStep

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

the class GoTest method runTests.

@Override
public ImmutableList<Step> runTests(ExecutionContext executionContext, TestRunningOptions options, SourcePathResolver pathResolver, TestReportingCallback testReportingCallback) {
    Optional<Long> processTimeoutMs = testRuleTimeoutMs.isPresent() ? Optional.of(testRuleTimeoutMs.get() + PROCESS_TIMEOUT_EXTRA_MS) : Optional.empty();
    ImmutableList.Builder<String> args = ImmutableList.builder();
    args.addAll(testMain.getExecutableCommand().getCommandPrefix(pathResolver));
    args.add("-test.v");
    if (testRuleTimeoutMs.isPresent()) {
        args.add("-test.timeout", testRuleTimeoutMs.get() + "ms");
    }
    return ImmutableList.of(new MakeCleanDirectoryStep(getProjectFilesystem(), getPathToTestOutputDirectory()), new MakeCleanDirectoryStep(getProjectFilesystem(), getPathToTestWorkingDirectory()), new SymlinkTreeStep(getProjectFilesystem(), getPathToTestWorkingDirectory(), ImmutableMap.copyOf(FluentIterable.from(resources).transform(input -> Maps.immutableEntry(getProjectFilesystem().getPath(pathResolver.getSourcePathName(getBuildTarget(), input)), pathResolver.getAbsolutePath(input))))), new GoTestStep(getProjectFilesystem(), getPathToTestWorkingDirectory(), args.build(), testMain.getExecutableCommand().getEnvironment(pathResolver), getPathToTestExitCode(), processTimeoutMs, getPathToTestResults()));
}
Also used : BinaryBuildRule(com.facebook.buck.rules.BinaryBuildRule) ExternalTestRunnerRule(com.facebook.buck.rules.ExternalTestRunnerRule) Step(com.facebook.buck.step.Step) HasRuntimeDeps(com.facebook.buck.rules.HasRuntimeDeps) SymlinkTreeStep(com.facebook.buck.step.fs.SymlinkTreeStep) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) ResultType(com.facebook.buck.test.result.type.ResultType) SourcePath(com.facebook.buck.rules.SourcePath) Callable(java.util.concurrent.Callable) TestCaseSummary(com.facebook.buck.test.TestCaseSummary) BuildRule(com.facebook.buck.rules.BuildRule) ExecutionContext(com.facebook.buck.step.ExecutionContext) NoopBuildRule(com.facebook.buck.rules.NoopBuildRule) TestRunningOptions(com.facebook.buck.test.TestRunningOptions) Lists(com.google.common.collect.Lists) Matcher(java.util.regex.Matcher) Label(com.facebook.buck.rules.Label) Tool(com.facebook.buck.rules.Tool) TestResults(com.facebook.buck.test.TestResults) ImmutableList(com.google.common.collect.ImmutableList) FluentIterable(com.google.common.collect.FluentIterable) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) TestResultSummary(com.facebook.buck.test.TestResultSummary) TestRule(com.facebook.buck.rules.TestRule) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams) Path(java.nio.file.Path) MoreCollectors(com.facebook.buck.util.MoreCollectors) ImmutableSortedSet(com.google.common.collect.ImmutableSortedSet) Charsets(com.google.common.base.Charsets) ImmutableSet(com.google.common.collect.ImmutableSet) AddToRuleKey(com.facebook.buck.rules.AddToRuleKey) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) ImmutableMap(com.google.common.collect.ImmutableMap) Files(java.nio.file.Files) Throwables(com.google.common.base.Throwables) IOException(java.io.IOException) BuildTarget(com.facebook.buck.model.BuildTarget) Maps(com.google.common.collect.Maps) List(java.util.List) Stream(java.util.stream.Stream) ExternalTestRunnerTestSpec(com.facebook.buck.rules.ExternalTestRunnerTestSpec) Optional(java.util.Optional) BufferedReader(java.io.BufferedReader) Pattern(java.util.regex.Pattern) BuildTargets(com.facebook.buck.model.BuildTargets) Joiner(com.google.common.base.Joiner) ImmutableList(com.google.common.collect.ImmutableList) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) SymlinkTreeStep(com.facebook.buck.step.fs.SymlinkTreeStep)

Aggregations

MakeCleanDirectoryStep (com.facebook.buck.step.fs.MakeCleanDirectoryStep)69 Path (java.nio.file.Path)57 SourcePath (com.facebook.buck.rules.SourcePath)53 Step (com.facebook.buck.step.Step)51 ImmutableList (com.google.common.collect.ImmutableList)47 ExplicitBuildTargetSourcePath (com.facebook.buck.rules.ExplicitBuildTargetSourcePath)42 MkdirStep (com.facebook.buck.step.fs.MkdirStep)25 ExecutionContext (com.facebook.buck.step.ExecutionContext)18 CopyStep (com.facebook.buck.step.fs.CopyStep)13 RmStep (com.facebook.buck.step.fs.RmStep)11 ImmutableMap (com.google.common.collect.ImmutableMap)11 BuildTarget (com.facebook.buck.model.BuildTarget)10 ProjectFilesystem (com.facebook.buck.io.ProjectFilesystem)9 BuildContext (com.facebook.buck.rules.BuildContext)9 BuildRuleParams (com.facebook.buck.rules.BuildRuleParams)9 SourcePathResolver (com.facebook.buck.rules.SourcePathResolver)9 StepExecutionResult (com.facebook.buck.step.StepExecutionResult)9 AbstractBuildRule (com.facebook.buck.rules.AbstractBuildRule)8 ShellStep (com.facebook.buck.shell.ShellStep)8 AbstractExecutionStep (com.facebook.buck.step.AbstractExecutionStep)8