You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by da...@apache.org on 2015/10/25 19:24:38 UTC

svn commit: r1710472 - /openoffice/trunk/test/testcommon/source/org/openoffice/test/common/SystemUtil.java

Author: damjan
Date: Sun Oct 25 18:24:38 2015
New Revision: 1710472

URL: http://svn.apache.org/viewvc?rev=1710472&view=rev
Log:
#i126604# test framework on *BSD calls "ps" wrongly, can't find AOO to kill it if hung

On *BSD, call "ps" with "-wweo", as the "ww" is needed to produce all the columns in the output.
Without it, output is trimmed short, and the test framework can't find AOO to kill it,
leaving AOO running and causing further tests to fail.


Modified:
    openoffice/trunk/test/testcommon/source/org/openoffice/test/common/SystemUtil.java

Modified: openoffice/trunk/test/testcommon/source/org/openoffice/test/common/SystemUtil.java
URL: http://svn.apache.org/viewvc/openoffice/trunk/test/testcommon/source/org/openoffice/test/common/SystemUtil.java?rev=1710472&r1=1710471&r2=1710472&view=diff
==============================================================================
--- openoffice/trunk/test/testcommon/source/org/openoffice/test/common/SystemUtil.java (original)
+++ openoffice/trunk/test/testcommon/source/org/openoffice/test/common/SystemUtil.java Sun Oct 25 18:24:38 2015
@@ -96,6 +96,10 @@ public class SystemUtil {
 	public static boolean isMac() {
 		return platform.startsWith("Mac");
 	}
+	
+	public static boolean isBSD() {
+		return platform.endsWith("BSD");
+	}
 
 	public static String getOSName() {
 		return osName;
@@ -301,6 +305,8 @@ public class SystemUtil {
 					FileUtil.writeStringToFile(file.getAbsolutePath(), contents);
 //				}
 				exec(new String[] { "cscript", "//Nologo", file.getAbsolutePath()}, null, null, output, output);
+			} else if (isBSD()) {
+				exec(new String[] {"ps", "-wweo", "pid,command"}, null, null, output, output);
 			} else {
 				exec(new String[] {"ps", "-eo", "pid,command"}, null, null, output, output);
 			}