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, shouldPrintStdoutpublic 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
IOExceptionprotected com.google.common.collect.ImmutableList<String> getShellCommandInternal(ExecutionContext context)
ShellStepgetShellCommandInternal in class ShellSteppublic StepExecutionResult execute(ExecutionContext context) throws InterruptedException, IOException
execute in interface Stepexecute in class ShellStepInterruptedExceptionIOExceptionpublic com.google.common.collect.ImmutableMap<String,String> getEnvironmentVariables(ExecutionContext context)
ShellStepShellStep.
By default, this method returns an empty map.
getEnvironmentVariables in class ShellStepcontext - that may be useful when determining environment variables to include.protected Optional<Long> getTimeout()
getTimeout in class ShellStepprotected Optional<java.util.function.Consumer<Process>> getTimeoutHandler(ExecutionContext context)
getTimeoutHandler in class ShellStepFunction to do something before the process is
killed.protected int getExitCodeFromResult(ExecutionContext context, ProcessExecutor.Result result)
getExitCodeFromResult in class ShellStepresult.public boolean hasTimedOut()