|
@@ -77,6 +77,12 @@ public class TestMojo extends AbstractMojo {
|
|
|
@Parameter(defaultValue="600")
|
|
|
private int timeout;
|
|
|
|
|
|
+ /**
|
|
|
+ * The working directory to use.
|
|
|
+ */
|
|
|
+ @Parameter
|
|
|
+ private File workingDirectory;
|
|
|
+
|
|
|
/**
|
|
|
* Path to results directory.
|
|
|
*/
|
|
@@ -307,6 +313,9 @@ public class TestMojo extends AbstractMojo {
|
|
|
getLog().info(bld.toString());
|
|
|
ProcessBuilder pb = new ProcessBuilder(cmd);
|
|
|
Exec.addEnvironment(pb, env);
|
|
|
+ if (workingDirectory != null) {
|
|
|
+ pb.directory(workingDirectory);
|
|
|
+ }
|
|
|
pb.redirectError(new File(results, testName + ".stderr"));
|
|
|
pb.redirectOutput(new File(results, testName + ".stdout"));
|
|
|
getLog().info("with extra environment variables " + Exec.envToString(env));
|