summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/source/java/org/openoffice/test/OfficeConnection.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/source/java/org/openoffice/test/OfficeConnection.java b/test/source/java/org/openoffice/test/OfficeConnection.java
index d0976689111e..a7231fce573e 100644
--- a/test/source/java/org/openoffice/test/OfficeConnection.java
+++ b/test/source/java/org/openoffice/test/OfficeConnection.java
@@ -53,13 +53,21 @@ public final class OfficeConnection {
public void setUp() throws Exception {
String sofficeArg = Argument.get("soffice");
if (sofficeArg.startsWith("path:")) {
+ String headless_flags = "";
+ try {
+ if(Argument.get("headless").length() > 0) {
+ // meh, we warn about -headless being replaced by --headless, but that does not actually work
+ headless_flags = "-headless";
+ }
+ } catch(Exception e) {}
description = "pipe,name=oootest" + UUID.randomUUID();
ProcessBuilder pb = new ProcessBuilder(
sofficeArg.substring("path:".length()), "--quickstart=no",
"--nofirststartwizard", "--norestore",
"--accept=" + description + ";urp",
"-env:UserInstallation=" + Argument.get("user"),
- "-env:UNO_JAVA_JFW_ENV_JREHOME=true");
+ "-env:UNO_JAVA_JFW_ENV_JREHOME=true",
+ headless_flags);
String envArg = Argument.get("env");
if (envArg != null) {
Map<String, String> env = pb.environment();