diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-11-26 12:04:07 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-11-26 12:04:07 +0000 |
commit | bea64d38467c56cf4d4bfabd7a75a42d6665b55b (patch) | |
tree | d324e2a56c36a30b1f541e8ac799d87c1403f527 /qadevOOo/runner/helper | |
parent | 9709a39d5b8d6e7f36d4c478f2fcf2386abd505d (diff) |
CWS-TOOLING: integrate CWS qadev34
2008-11-24 12:04:37 +0100 cn r264220 : #i96037 bugfix: remove superfluous exclamation mark
2008-11-20 20:52:21 +0100 cn r264100 : #i95964 fixes for cygwin
2008-11-20 12:10:41 +0100 cn r264040 : #i95964 replacesment for cwsquery modules
2008-11-10 10:29:48 +0100 cn r263511 : #i96037 register installoffice.oxt
2008-11-07 15:44:58 +0100 cn r263423 : #i95964# changes for 'cwstouched' wihch is a replacemant for 'cwsquery modules'
2008-10-31 14:04:47 +0100 cn r262866 : #i95303# add XDEBUG variable
2008-10-31 14:03:39 +0100 cn r262865 : #i95610# update lists
2008-10-31 09:47:27 +0100 cn r262855 : #i95303# bugfix
2008-10-31 09:47:06 +0100 cn r262854 : #i95303# bugfix
2008-10-30 21:42:14 +0100 cn r262837 : #i95204 remove -OOO_EnvSet parameter
2008-10-30 21:33:18 +0100 cn r262836 : #i95304 add -enableautomation as soffice parameter
2008-10-30 10:20:24 +0100 cn r262822 : #i95610 update lists
2008-10-27 22:00:00 +0100 cn r262691 : #i95513#: add support for -runnerini as aditional ini file
2008-10-27 21:35:17 +0100 cn r262690 : #i95513# use -runnerini instead of -ini
2008-10-23 13:41:32 +0200 cn r262621 : #i95303# changes to run cwscheckapi in cygwin environment
2008-10-22 10:18:36 +0200 cn r262581 : #i95304# disable QuckStarter while trying to dispose the office
2008-10-22 09:59:39 +0200 cn r262580 : #i95303# add cygwin related stuff
2008-10-22 09:59:10 +0200 cn r262579 : #i95303# add cygwin related stuff
2008-10-22 09:57:40 +0200 cn r262578 : #i95303# add property CYGWIN
Diffstat (limited to 'qadevOOo/runner/helper')
-rw-r--r-- | qadevOOo/runner/helper/BuildEnvTools.java | 25 | ||||
-rw-r--r-- | qadevOOo/runner/helper/ClParser.java | 18 | ||||
-rw-r--r-- | qadevOOo/runner/helper/CwsDataExchangeImpl.java | 12 | ||||
-rw-r--r-- | qadevOOo/runner/helper/OfficeProvider.java | 11 | ||||
-rw-r--r-- | qadevOOo/runner/helper/ProcessHandler.java | 8 |
5 files changed, 56 insertions, 18 deletions
diff --git a/qadevOOo/runner/helper/BuildEnvTools.java b/qadevOOo/runner/helper/BuildEnvTools.java index a9f23161bc25..95c6446477c3 100644 --- a/qadevOOo/runner/helper/BuildEnvTools.java +++ b/qadevOOo/runner/helper/BuildEnvTools.java @@ -48,6 +48,7 @@ public class BuildEnvTools { private final boolean mDebug; private final String mPlatform; private final String mShell; + private boolean mCygwin; /** * This constructor creates an instance of BuildEncTools. It is verifying for all neccesarry @@ -98,6 +99,8 @@ public class BuildEnvTools { error = true; } + mCygwin = (param.getBool(PropertyName.CYGWIN)); + if (error) { throw new ParameterNotFoundException(msg); } @@ -111,7 +114,7 @@ public class BuildEnvTools { * @return the processHandler of the commands * @see helper.ProcessHandler */ - public ProcessHandler runCommandsInEnvironmentShell(String[] commands, File workDir, boolean shortWait) { + public ProcessHandler runCommandsInEnvironmentShell(String[] commands, File workDir, int shortWait) { final String[] cmdLines = getCmdLinesWithCommand(commands); final ProcessHandler pHdl = new ProcessHandler(cmdLines, (PrintWriter) log, workDir, shortWait, param); @@ -125,14 +128,13 @@ public class BuildEnvTools { if (sSrcRoot == null) { String[] cmdLines = null; - - if (mPlatform.equals(PropertyName.WNTMSCI)) { + if (mPlatform.equals(PropertyName.WNTMSCI) && ! mCygwin) { cmdLines = new String[]{mShell, "/C", "echo SRC_ROOT=%SRC_ROOT"}; } else { - cmdLines = new String[]{mShell, "-c ", "echo \"SRC_ROOT=$SRC_ROOT\""}; + cmdLines = new String[]{mShell, "--login ", "-c ", "echo \"SRC_ROOT=$SRC_ROOT\""}; } - final ProcessHandler procHdl = new ProcessHandler(cmdLines, (PrintWriter) log, null, true, param); + final ProcessHandler procHdl = new ProcessHandler(cmdLines, (PrintWriter) log, null, 5000, param); procHdl.runCommand(); if (mDebug) { @@ -162,7 +164,7 @@ public class BuildEnvTools { String seperator = ""; if (mPlatform.equals(PropertyName.WNTMSCI)) { - seperator = "^"; + seperator = mCygwin ? ";" : "^"; } else { seperator = ";"; } @@ -175,10 +177,17 @@ public class BuildEnvTools { command += commands[i]; } - if (mPlatform.equals(PropertyName.WNTMSCI)) { + if (mPlatform.equals(PropertyName.WNTMSCI)){ + if (mCygwin){ + String srcRoot = (String) param.get(PropertyName.SRC_ROOT); + String envSet = "export cyg_src_root=`cygpath '" + srcRoot.replaceAll("\\\\", "\\\\\\\\")+ "'`; source $cyg_src_root/winenv.set.sh;"; + command = envSet + command; + cmdLines = new String[]{mShell, "--login", "-c", "\"" + command + "\""}; + } else { cmdLines = new String[]{mShell, "/C", "\"" + command + "\""}; + } } else { - cmdLines = new String[]{mShell, "-c ", command}; + cmdLines = new String[]{mShell, "-c", command}; } return cmdLines; } diff --git a/qadevOOo/runner/helper/ClParser.java b/qadevOOo/runner/helper/ClParser.java index 3e0907122877..eddd351fdb0a 100644 --- a/qadevOOo/runner/helper/ClParser.java +++ b/qadevOOo/runner/helper/ClParser.java @@ -106,6 +106,24 @@ public class ClParser { for (int i = 0; i < args.length; i++) { if (args[i].equals("-ini")) { iniFile = args[i + 1]; + break; + } + } + + return iniFile; + } + + /* + * This method returns the path to a Configuration file <br> + * if defined as command line parameter, an empty String elsewhere + */ + public String getRunnerIniPath(String[] args) { + String iniFile = ""; + + for (int i = 0; i < args.length; i++) { + if (args[i].equals("-runnerini")) { + iniFile = args[i + 1]; + break; } } diff --git a/qadevOOo/runner/helper/CwsDataExchangeImpl.java b/qadevOOo/runner/helper/CwsDataExchangeImpl.java index 3da98a8514c8..4341fa3f47d5 100644 --- a/qadevOOo/runner/helper/CwsDataExchangeImpl.java +++ b/qadevOOo/runner/helper/CwsDataExchangeImpl.java @@ -60,12 +60,12 @@ public class CwsDataExchangeImpl implements CwsDataExchange { } public ArrayList getModules() { - // the cwsquery command send its version information to StdErr. + // the cwstouched command send its version information to StdErr. // A piping from StdErr to SdtOut the tcsh does not support. // To find the output easily the echo command is used - final String[] commands = {"echo cwsquery starts here", "cwsquery modules", "echo cwsquery ends here"}; + final String[] commands = {"echo cwstouched starts here", "cwstouched", "echo cwstouched ends here"}; - final ProcessHandler procHdl = bet.runCommandsInEnvironmentShell(commands, null, true); + final ProcessHandler procHdl = bet.runCommandsInEnvironmentShell(commands, null, 20000); if (mDebug) { log.println("---> Output of getModules:"); @@ -82,13 +82,13 @@ public class CwsDataExchangeImpl implements CwsDataExchange { boolean start = false; for (int i = 0; i < outs.length; i++) { final String line = outs[i]; - if (line.startsWith("cwsquery ends here")) { + if (line.startsWith("cwstouched ends here")) { start = false; } if (start && !line.equals("")) { moduleNames.add(line); } - if (line.startsWith("cwsquery starts here")) { + if (line.startsWith("cwstouched starts here")) { start = true; } } @@ -115,7 +115,7 @@ public class CwsDataExchangeImpl implements CwsDataExchange { final String[] commands = {"cwsattach " + statusFile}; - bet.runCommandsInEnvironmentShell(commands, null, true); + bet.runCommandsInEnvironmentShell(commands, null, 5000); } catch (IOException ex) { System.out.println("ERROR: could not attach file '" + statusFile + "' to cws\n" + ex.toString()); diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java index 64408418f22a..a6743c775729 100644 --- a/qadevOOo/runner/helper/OfficeProvider.java +++ b/qadevOOo/runner/helper/OfficeProvider.java @@ -30,6 +30,7 @@ package helper; //import com.sun.star.bridge.UnoUrlResolver; +import com.sun.star.beans.XFastPropertySet; import com.sun.star.bridge.XUnoUrlResolver; import com.sun.star.container.XEnumeration; import com.sun.star.container.XEnumerationAccess; @@ -413,6 +414,16 @@ public class OfficeProvider implements AppProvider { boolean result = true; if (msf != null) { + + // disable QuickStarter + try { + Object quickStarter = msf.createInstance("com.sun.star.office.Quickstart"); + XFastPropertySet fps = (XFastPropertySet) UnoRuntime.queryInterface(XFastPropertySet.class, quickStarter); + fps.setFastPropertyValue(0, false); + } catch (com.sun.star.uno.Exception ex) { + dbg("ERROR: Could not disable QuickStarter: " + ex.toString()); + } + try { desk = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, msf.createInstance( diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java index af469fdf6442..00da332acf5d 100644 --- a/qadevOOo/runner/helper/ProcessHandler.java +++ b/qadevOOo/runner/helper/ProcessHandler.java @@ -301,18 +301,18 @@ public class ProcessHandler { * @param commands * @param log * @param workDir - * @param shortWait If this parameter is ture the <CODE>mTimeOut</CODE> is set to 3000 ms, else it is set to + * @param shortWait If this parameter is ture the <CODE>mTimeOut</CODE> is set to 5000 ms, else it is set to * half of time out from parameter timeout. * @param param the TestParameters * @see lib.TestParameters * @see helper.OfficeWatcher */ - public ProcessHandler(String[] commands, PrintWriter log, File workDir, boolean shortWait, TestParameters param) { + public ProcessHandler(String[] commands, PrintWriter log, File workDir, int shortWait, TestParameters param) { this(null, log, workDir, null, 0); this.cmdLineArray = commands; this.param = param; - if (shortWait) { - this.mTimeOut = 5000; + if (shortWait != 0) { + this.mTimeOut = shortWait; } else { this.mTimeOut = (long) (param.getInt(PropertyName.TIME_OUT) / 1.3); } |