diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-03-29 19:51:34 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-03-29 21:06:07 +0200 |
commit | 735ccf405c64c281eda579039f52e56709a1df40 (patch) | |
tree | 486e59b5aa81052b1a79038eef2819c2fbb82e9f /test | |
parent | 789bf3ed20e49d5a37338a53ef4f26f4a85ea948 (diff) |
enable headless Junit tests
Diffstat (limited to 'test')
-rw-r--r-- | test/source/java/org/openoffice/test/OfficeConnection.java | 10 |
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(); |