summaryrefslogtreecommitdiff
path: root/qadevOOo/runner
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-10-04 13:06:24 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-10-04 13:06:24 +0200
commit0e788afb627639d2d463d5d8061ebbec849b219f (patch)
tree778c4de0aba784c015b20663b7d8fa9b952d4c95 /qadevOOo/runner
parent8abb1fb68c203ec4dcdf1bfcd201d973dcefb0cf (diff)
parenta4811ec3dcfb8d54cb757065835707c209ef6c64 (diff)
dba34b: merge after pulling sb123
Diffstat (limited to 'qadevOOo/runner')
-rw-r--r--qadevOOo/runner/helper/ProcessHandler.java25
-rw-r--r--qadevOOo/runner/org/openoffice/Runner.java2
2 files changed, 21 insertions, 6 deletions
diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java
index c414accd44ac..519c7473a50f 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -33,10 +33,12 @@ import java.io.PrintStream;
import java.io.LineNumberReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
+import java.io.Writer;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import lib.TestParameters;
+import share.LogWriter;
import util.PropertyName;
import util.utils;
@@ -58,6 +60,7 @@ class Pump extends Thread
private String pref;
private StringBuffer buf = new StringBuffer(256);
private PrintWriter log;
+ private boolean bOutput;
/**
* Creates Pump for specified <code>InputStream</code>.
@@ -70,11 +73,12 @@ class Pump extends Thread
* @param outPrefix A prefix which is printed at the
* beginning of each output line.
*/
- public Pump(InputStream is, PrintWriter log, String outPrefix)
+ public Pump(InputStream is, PrintWriter log, String outPrefix, boolean _bOutput)
{
this.pref = (outPrefix == null) ? "" : outPrefix;
reader = new LineNumberReader(new InputStreamReader(is));
this.log = log;
+ this.bOutput = _bOutput;
start();
}
@@ -85,8 +89,11 @@ class Pump extends Thread
String line = reader.readLine();
while (line != null)
{
- log.println(pref + line);
- log.flush();
+ if (bOutput)
+ {
+ log.println(pref + line);
+ log.flush();
+ }
buf.append(line).append('\n');
line = reader.readLine();
}
@@ -134,6 +141,8 @@ public class ProcessHandler
private TestParameters param = null;
private boolean debug = false;
+ private boolean bUseOutput = true;
+
/**
* Creates instance with specified external command.
* Debug info and output
@@ -566,8 +575,8 @@ public class ProcessHandler
return;
}
dbg("execute: pump io-streams");
- stdout = new Pump(m_aProcess.getInputStream(), log, "out > ");
- stderr = new Pump(m_aProcess.getErrorStream(), log, "err > ");
+ stdout = new Pump(m_aProcess.getInputStream(), log, "out > ", bUseOutput);
+ stderr = new Pump(m_aProcess.getErrorStream(), log, "err > ", bUseOutput);
stdIn = new PrintStream(m_aProcess.getOutputStream());
// int nExitValue = m_aProcess.exitValue();
@@ -821,4 +830,10 @@ public class ProcessHandler
log.println(utils.getDateTime() + "PH." + message);
}
}
+
+ public void noOutput()
+ {
+ bUseOutput = false;
+ }
+
}
diff --git a/qadevOOo/runner/org/openoffice/Runner.java b/qadevOOo/runner/org/openoffice/Runner.java
index a3741774917e..41f96a4d384e 100644
--- a/qadevOOo/runner/org/openoffice/Runner.java
+++ b/qadevOOo/runner/org/openoffice/Runner.java
@@ -184,7 +184,7 @@ public class Runner
public static boolean run(String... args)
{
- System.out.println("OOoRunner Main() version from 20100323 (yyyymmdd)");
+ System.out.println("OOoRunner Main() version from 20100630 (yyyymmdd)");
setStartTime(getTime());