public class RuleAnalysisLegacyTestBuildRuleView extends RuleAnalysisLegacyBinaryBuildRuleView implements TestRule, ExternalTestRunnerRule
RuleAnalysisLegacyBuildRuleView, but also implements TestRule so that this
rule can be run by buck testTestRule.TestReportingCallbackNOOP_REPORTING_CALLBACK| Constructor and Description |
|---|
RuleAnalysisLegacyTestBuildRuleView(String type,
BuildTarget buildTarget,
Optional<Action> action,
BuildRuleResolver ruleResolver,
ProjectFilesystem projectFilesystem,
ProviderInfoCollection providerInfoCollection)
Create an instance of
RuleAnalysisLegacyTestBuildRuleView |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableSet<String> |
getContacts() |
ExternalTestSpec |
getExternalTestRunnerSpec(ExecutionContext executionContext,
TestRunningOptions testRunningOptions,
BuildContext buildContext) |
com.google.common.collect.ImmutableSet<String> |
getLabels() |
Path |
getPathToTestOutputDirectory() |
Callable<TestResults> |
interpretTestResults(ExecutionContext executionContext,
SourcePathResolverAdapter pathResolver,
boolean isUsingTestSelectors) |
com.google.common.collect.ImmutableList<Step> |
runTests(ExecutionContext executionContext,
TestRunningOptions options,
BuildContext buildContext,
TestRule.TestReportingCallback testReportingCallback)
Returns the commands required to run the tests.
|
boolean |
runTestSeparately() |
boolean |
supportsStreamingTests() |
getExecutableCommandgetBuildDeps, getBuildSteps, getOutputLabels, getProviderInfos, getSourcePathToOutput, getSourcePathToOutput, getType, isCacheable, updateBuildRuleResolverequals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, hasBuildSteps, hashCode, injectFields, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitonPreTestcompareTo, getBuildDeps, getBuildSteps, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, getSourcePathToOutput, hasBuildSteps, isCacheable, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString, updateBuildRuleResolvergetDependencies, getSourcePathOutputsgetTypeinputBasedRuleKeyIsEnabled, isSupportedpublic RuleAnalysisLegacyTestBuildRuleView(String type, BuildTarget buildTarget, Optional<Action> action, BuildRuleResolver ruleResolver, ProjectFilesystem projectFilesystem, ProviderInfoCollection providerInfoCollection)
RuleAnalysisLegacyTestBuildRuleViewtype - the type of this BuildRulebuildTarget - the BuildTarget of this analysis ruleaction - the action of the result for which we want to provide the BuildRule viewruleResolver - the current BuildRuleResolver to query dependent rulesprojectFilesystem - the filesystemproviderInfoCollection - the providers returned by this build targetIllegalStateException - if providerInfoCollection does not contain an instance of
both RunInfo and TestInfopublic com.google.common.collect.ImmutableList<Step> runTests(ExecutionContext executionContext, TestRunningOptions options, BuildContext buildContext, TestRule.TestReportingCallback testReportingCallback)
TestRuleNote: This method may be run without BuildEngine.build(com.facebook.buck.core.build.engine.BuildEngineBuildContext,
ExecutionContext, BuildRule) having been run. This happens if the user has built [and ran] the
test previously and then re-runs it using the --debug flag.
public Callable<TestResults> interpretTestResults(ExecutionContext executionContext, SourcePathResolverAdapter pathResolver, boolean isUsingTestSelectors)
interpretTestResults in interface TestRulepublic com.google.common.collect.ImmutableSet<String> getLabels()
public com.google.common.collect.ImmutableSet<String> getContacts()
getContacts in interface TestRulepublic Path getPathToTestOutputDirectory()
getPathToTestOutputDirectory in interface TestRulepublic boolean runTestSeparately()
runTestSeparately in interface TestRulepublic boolean supportsStreamingTests()
supportsStreamingTests in interface TestRulerunTests() on this rule invokes the callbacks in testReportingCallback as the tests run, false otherwise.public ExternalTestSpec getExternalTestRunnerSpec(ExecutionContext executionContext, TestRunningOptions testRunningOptions, BuildContext buildContext)
getExternalTestRunnerSpec in interface ExternalTestRunnerRule