summaryrefslogtreecommitdiff
path: root/test/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-09-16 10:38:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2011-09-16 10:38:06 +0200
commit7d1bb036e1d0c20920703e64132d76e4cce06826 (patch)
tree09d3bbf44e8fb031c2f8693ec5aeb35cd0925bb1 /test/source
parentbf0a3adda154c9251cf9c3aae3337eed26a695cd (diff)
Simplified setting headless mode for smoke-/subsequenttetss.
Both C++ and Java OfficeConnection code now always pass --headless, so no need for SAL_USE_VCLPLUGIN=svp etc. any more. Only some C++ unit tests that link against vcl still need an explicit --headless.
Diffstat (limited to 'test/source')
-rw-r--r--test/source/cpp/officeconnection.cxx15
-rw-r--r--test/source/java/org/openoffice/test/OfficeConnection.java11
2 files changed, 11 insertions, 15 deletions
diff --git a/test/source/cpp/officeconnection.cxx b/test/source/cpp/officeconnection.cxx
index fe3ad5a05a48..a40451eb30ae 100644
--- a/test/source/cpp/officeconnection.cxx
+++ b/test/source/cpp/officeconnection.cxx
@@ -74,8 +74,10 @@ void OfficeConnection::setUp() {
rtl::OUString nofirstArg(
RTL_CONSTASCII_USTRINGPARAM("--nofirststartwizard"));
rtl::OUString norestoreArg(RTL_CONSTASCII_USTRINGPARAM("--norestore"));
- //Disable use of the unix standalone splash screen app for the tests
- rtl::OUString noSplashArg(RTL_CONSTASCII_USTRINGPARAM("--nologo"));
+ rtl::OUString nologoArg(RTL_CONSTASCII_USTRINGPARAM("--nologo"));
+ // disable use of the unix standalone splash screen app for the
+ // tests (probably not needed in combination with --headless?)
+ rtl::OUString headlessArg(RTL_CONSTASCII_USTRINGPARAM("--headless"));
rtl::OUString acceptArg(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--accept=")) + desc +
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";urp")));
@@ -93,8 +95,9 @@ void OfficeConnection::setUp() {
RTL_CONSTASCII_USTRINGPARAM(
"-env:UNO_JAVA_JFW_ENV_CLASSPATH=true"));
rtl_uString * args[] = {
- noquickArg.pData, nofirstArg.pData, norestoreArg.pData, noSplashArg.pData,
- acceptArg.pData, userArg.pData, jreArg.pData, classpathArg.pData };
+ noquickArg.pData, nofirstArg.pData, norestoreArg.pData,
+ nologoArg.pData, headlessArg.pData, acceptArg.pData, userArg.pData,
+ jreArg.pData, classpathArg.pData };
rtl_uString ** envs = 0;
rtl::OUString argEnv;
if (detail::getArgument(
@@ -107,8 +110,8 @@ void OfficeConnection::setUp() {
osl_executeProcess(
toAbsoluteFileUrl(
argSoffice.copy(RTL_CONSTASCII_LENGTH("path:"))).pData,
- args, SAL_N_ELEMENTS( args ), 0, 0, 0, envs,
- envs == 0 ? 0 : 1, &process_));
+ args, SAL_N_ELEMENTS(args), 0, 0, 0, envs, envs == 0 ? 0 : 1,
+ &process_));
} else if (argSoffice.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("connect:"))) {
desc = argSoffice.copy(RTL_CONSTASCII_LENGTH("connect:"));
} else {
diff --git a/test/source/java/org/openoffice/test/OfficeConnection.java b/test/source/java/org/openoffice/test/OfficeConnection.java
index 8cd29673e928..b05c34bc3996 100644
--- a/test/source/java/org/openoffice/test/OfficeConnection.java
+++ b/test/source/java/org/openoffice/test/OfficeConnection.java
@@ -53,20 +53,13 @@ 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) {
- headless_flags = "--headless";
- }
- } catch(Exception e) {}
description = "pipe,name=oootest" + UUID.randomUUID();
ProcessBuilder pb = new ProcessBuilder(
sofficeArg.substring("path:".length()), "--quickstart=no",
- "--nofirststartwizard", "--norestore", "--nologo",
+ "--nofirststartwizard", "--norestore", "--nologo", "--headless",
"--accept=" + description + ";urp",
"-env:UserInstallation=" + Argument.get("user"),
- "-env:UNO_JAVA_JFW_ENV_JREHOME=true",
- headless_flags);
+ "-env:UNO_JAVA_JFW_ENV_JREHOME=true");
String envArg = Argument.get("env");
if (envArg != null) {
Map<String, String> env = pb.environment();