public class RobolectricTest extends JavaTest
JavaTest.AdditionalClasspathEntriesProvider
TestRule.TestReportingCallback
COMPILED_TESTS_LIBRARY_FLAVOR
NOOP_REPORTING_CALLBACK
Modifier | Constructor and Description |
---|---|
protected |
RobolectricTest(BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
BuildRuleParams buildRuleParams,
AndroidPlatformTarget androidPlatformTarget,
JavaLibrary compiledTestsLibrary,
Set<String> labels,
Set<String> contacts,
TestType testType,
String targetLevel,
List<Arg> vmArgs,
Map<String,String> nativeLibsEnvironment,
Optional<DummyRDotJava> optionalDummyRDotJava,
Optional<UnitTestOptions> unitTestOptions,
Optional<Long> testRuleTimeoutMs,
Optional<Long> testCaseTimeoutMs,
com.google.common.collect.ImmutableMap<String,Arg> env,
boolean runTestSeparately,
ForkMode forkMode,
Optional<Level> stdOutLogLevel,
Optional<Level> stdErrLogLevel,
Optional<SourcePath> unbundledResourcesRoot,
Optional<SourcePath> robolectricRuntimeDependency,
Optional<SourcePath> robolectricManifest,
boolean passDirectoriesInFile,
Tool javaRuntimeLauncher) |
Modifier and Type | Method and Description |
---|---|
protected void |
addPreTestSteps(BuildContext buildContext,
com.google.common.collect.ImmutableList.Builder<Step> stepsBuilder) |
protected com.google.common.collect.ImmutableSet<Path> |
getBootClasspathEntries() |
java.util.stream.Stream<BuildTarget> |
getRuntimeDeps(BuildRuleResolver buildRuleResolver) |
protected void |
onAmendVmArgs(com.google.common.collect.ImmutableList.Builder<String> vmArgsBuilder,
SourcePathResolverAdapter pathResolver,
Optional<TargetDevice> targetDevice)
Override this method if you need to amend vm args.
|
void |
onPreTest(BuildContext buildContext) |
forkMode, getBuildSteps, getCompiledTestsLibrary, getContacts, getExportedDeps, getExportedProvidedDeps, getExternalTestRunnerSpec, getImmediateClasspaths, getLabels, getOutputClasspaths, getPathToTestOutputDirectory, getPostBuildSteps, getRuntimeClasspath, getSourcePathToOutput, getTransitiveClasspathDeps, getTransitiveClasspaths, interpretTestResults, runTests, runTestSeparately, supportsStreamingTests
deprecatedGetExtraDeps, getBuildDeps, getDeclaredDeps, getTargetGraphOnlyDeps
equals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hasBuildSteps, hashCode, injectFields, isCacheable, toString, updateBuildRuleResolver
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo, getBuildDeps, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, hasBuildSteps, isCacheable, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString, updateBuildRuleResolver
getDependencies, getSourcePathOutputs
getType
protected RobolectricTest(BuildTarget buildTarget, ProjectFilesystem projectFilesystem, BuildRuleParams buildRuleParams, AndroidPlatformTarget androidPlatformTarget, JavaLibrary compiledTestsLibrary, Set<String> labels, Set<String> contacts, TestType testType, String targetLevel, List<Arg> vmArgs, Map<String,String> nativeLibsEnvironment, Optional<DummyRDotJava> optionalDummyRDotJava, Optional<UnitTestOptions> unitTestOptions, Optional<Long> testRuleTimeoutMs, Optional<Long> testCaseTimeoutMs, com.google.common.collect.ImmutableMap<String,Arg> env, boolean runTestSeparately, ForkMode forkMode, Optional<Level> stdOutLogLevel, Optional<Level> stdErrLogLevel, Optional<SourcePath> unbundledResourcesRoot, Optional<SourcePath> robolectricRuntimeDependency, Optional<SourcePath> robolectricManifest, boolean passDirectoriesInFile, Tool javaRuntimeLauncher)
protected com.google.common.collect.ImmutableSet<Path> getBootClasspathEntries()
getBootClasspathEntries
in class JavaTest
protected void addPreTestSteps(BuildContext buildContext, com.google.common.collect.ImmutableList.Builder<Step> stepsBuilder)
addPreTestSteps
in class JavaTest
protected void onAmendVmArgs(com.google.common.collect.ImmutableList.Builder<String> vmArgsBuilder, SourcePathResolverAdapter pathResolver, Optional<TargetDevice> targetDevice)
JavaTest
onAmendVmArgs
in class JavaTest
public void onPreTest(BuildContext buildContext) throws IOException
onPreTest
in interface ExternalTestRunnerRule
onPreTest
in class JavaTest
IOException
public java.util.stream.Stream<BuildTarget> getRuntimeDeps(BuildRuleResolver buildRuleResolver)
getRuntimeDeps
in interface HasRuntimeDeps
getRuntimeDeps
in class JavaTest