workingDirectory
Constructor and Description |
---|
JUnitStep(ProjectFilesystem filesystem,
Map<String,String> nativeLibsEnvironment,
Optional<Long> testRuleTimeoutMs,
Optional<Long> testCaseTimeoutMs,
com.google.common.collect.ImmutableMap<String,String> env,
com.google.common.collect.ImmutableList<String> javaRuntimeLauncher,
com.facebook.buck.jvm.java.JUnitJvmArgs junitJvmArgs) |
Modifier and Type | Method and Description |
---|---|
void |
ensureClasspathArgfile()
Ensures the classpath argfile for Java 9+ invocations has been created.
|
StepExecutionResult |
execute(ExecutionContext context) |
Path |
getClasspathArgfile()
Returns the classpath argfile for Java 9+ invocations.
|
com.google.common.collect.ImmutableMap<String,String> |
getEnvironmentVariables(ExecutionContext context)
Returns the environment variables to include when running this
ShellStep . |
protected int |
getExitCodeFromResult(ExecutionContext context,
ProcessExecutor.Result result) |
protected com.google.common.collect.ImmutableList<String> |
getShellCommandInternal(ExecutionContext context)
Implementations of this method should not have any observable side-effects.
|
String |
getShortName() |
protected Optional<Long> |
getTimeout() |
protected Optional<java.util.function.Consumer<Process>> |
getTimeoutHandler(ExecutionContext context) |
boolean |
hasTimedOut() |
addOptions, getDescription, getDuration, getShellCommand, getShellCommandArgsForDescription, getStderr, getStdin, getStdout, shouldPrintStderr, shouldPrintStdout
public JUnitStep(ProjectFilesystem filesystem, Map<String,String> nativeLibsEnvironment, Optional<Long> testRuleTimeoutMs, Optional<Long> testCaseTimeoutMs, com.google.common.collect.ImmutableMap<String,String> env, com.google.common.collect.ImmutableList<String> javaRuntimeLauncher, com.facebook.buck.jvm.java.JUnitJvmArgs junitJvmArgs)
public String getShortName()
public Path getClasspathArgfile()
public void ensureClasspathArgfile() throws IOException
IOException
protected com.google.common.collect.ImmutableList<String> getShellCommandInternal(ExecutionContext context)
ShellStep
getShellCommandInternal
in class ShellStep
public StepExecutionResult execute(ExecutionContext context) throws InterruptedException, IOException
execute
in interface Step
execute
in class ShellStep
InterruptedException
IOException
public com.google.common.collect.ImmutableMap<String,String> getEnvironmentVariables(ExecutionContext context)
ShellStep
ShellStep
.
By default, this method returns an empty map.
getEnvironmentVariables
in class ShellStep
context
- that may be useful when determining environment variables to include.protected Optional<Long> getTimeout()
getTimeout
in class ShellStep
protected Optional<java.util.function.Consumer<Process>> getTimeoutHandler(ExecutionContext context)
getTimeoutHandler
in class ShellStep
Function
to do something before the process is
killed.protected int getExitCodeFromResult(ExecutionContext context, ProcessExecutor.Result result)
getExitCodeFromResult
in class ShellStep
result
.public boolean hasTimedOut()