public class ShTest extends NoopBuildRuleWithDeclaredAndExtraDeps implements TestRule, HasRuntimeDeps, ExternalTestRunnerRule, BinaryBuildRule
TestRule.TestReportingCallbackNOOP_REPORTING_CALLBACK| Modifier | Constructor and Description |
|---|---|
protected |
ShTest(BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
BuildRuleParams params,
com.google.common.collect.ImmutableList<Arg> args,
com.google.common.collect.ImmutableMap<String,Arg> env,
com.google.common.collect.ImmutableSortedSet<? extends SourcePath> resources,
Optional<Long> testRuleTimeoutMs,
boolean runTestSeparately,
Set<String> labels,
Optional<String> type,
com.google.common.collect.ImmutableSet<String> contacts) |
| Modifier and Type | Method and Description |
|---|---|
protected com.google.common.collect.ImmutableList<Arg> |
getArgs() |
com.google.common.collect.ImmutableSet<String> |
getContacts() |
protected com.google.common.collect.ImmutableMap<String,Arg> |
getEnv() |
Tool |
getExecutableCommand(OutputLabel outputLabel)
Command to execute the output of this rule.
|
ExternalTestSpec |
getExternalTestRunnerSpec(ExecutionContext executionContext,
TestRunningOptions testRunningOptions,
BuildContext buildContext) |
com.google.common.collect.ImmutableSet<String> |
getLabels() |
Path |
getPathToTestOutputDirectory() |
java.util.stream.Stream<BuildTarget> |
getRuntimeDeps(BuildRuleResolver buildRuleResolver) |
Callable<TestResults> |
interpretTestResults(ExecutionContext context,
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() |
getBuildSteps, getSourcePathToOutput, hasBuildSteps, isCacheabledeprecatedGetExtraDeps, getBuildDeps, getDeclaredDeps, getTargetGraphOnlyDepsequals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hashCode, injectFields, toString, updateBuildRuleResolverclone, finalize, getClass, notify, notifyAll, wait, wait, waitonPreTestcompareTo, getBuildDeps, getBuildSteps, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, getSourcePathToOutput, hasBuildSteps, isCacheable, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString, updateBuildRuleResolvergetDependencies, getSourcePathOutputsgetTypeprotected ShTest(BuildTarget buildTarget, ProjectFilesystem projectFilesystem, BuildRuleParams params, com.google.common.collect.ImmutableList<Arg> args, com.google.common.collect.ImmutableMap<String,Arg> env, com.google.common.collect.ImmutableSortedSet<? extends SourcePath> resources, Optional<Long> testRuleTimeoutMs, boolean runTestSeparately, Set<String> labels, Optional<String> type, com.google.common.collect.ImmutableSet<String> contacts)
public com.google.common.collect.ImmutableSet<String> getLabels()
public com.google.common.collect.ImmutableSet<String> getContacts()
getContacts in interface TestRulepublic 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 Path getPathToTestOutputDirectory()
getPathToTestOutputDirectory in interface TestRulepublic Callable<TestResults> interpretTestResults(ExecutionContext context, SourcePathResolverAdapter pathResolver, boolean isUsingTestSelectors)
interpretTestResults in interface TestRulepublic boolean runTestSeparately()
runTestSeparately in interface TestRulepublic java.util.stream.Stream<BuildTarget> getRuntimeDeps(BuildRuleResolver buildRuleResolver)
getRuntimeDeps in interface HasRuntimeDepspublic boolean supportsStreamingTests()
supportsStreamingTests in interface TestRulerunTests() on this rule invokes the callbacks in testReportingCallback as the tests run, false otherwise.public Tool getExecutableCommand(OutputLabel outputLabel)
BinaryBuildRulegetExecutableCommand in interface BinaryBuildRuleoutputLabel - associated with the executablepublic ExternalTestSpec getExternalTestRunnerSpec(ExecutionContext executionContext, TestRunningOptions testRunningOptions, BuildContext buildContext)
getExternalTestRunnerSpec in interface ExternalTestRunnerRuleprotected com.google.common.collect.ImmutableList<Arg> getArgs()