From: <otm...@us...> - 2008-12-13 14:27:25
|
Revision: 5753 http://jython.svn.sourceforge.net/jython/?rev=5753&view=rev Author: otmarhumbel Date: 2008-12-13 14:27:18 +0000 (Sat, 13 Dec 2008) Log Message: ----------- allow switching to a different java version for verification, e.g: -A -j /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home Modified Paths: -------------- trunk/installer/src/java/org/python/util/install/driver/NormalVerifier.java Modified: trunk/installer/src/java/org/python/util/install/driver/NormalVerifier.java =================================================================== --- trunk/installer/src/java/org/python/util/install/driver/NormalVerifier.java 2008-12-13 07:33:55 UTC (rev 5752) +++ trunk/installer/src/java/org/python/util/install/driver/NormalVerifier.java 2008-12-13 14:27:18 UTC (rev 5753) @@ -214,7 +214,7 @@ StringTokenizer tokenizer = new StringTokenizer(error, "\n"); while (tokenizer.hasMoreTokens()) { String line = tokenizer.nextToken(); - if (line.startsWith("*sys-package-mgr*")) { + if (isExpectedError(line)) { feedback(line); } else { throw new DriverException(error); @@ -222,20 +222,29 @@ } } + private boolean isExpectedError(String line) { + boolean expected = false; + if (line.startsWith("*sys-package-mgr*")) { + expected = true; + } else if (line.indexOf("32 bit") >= 0 && line.indexOf("64 bit") >= 0) { + // OS X incompatibility message when using -A -j java1.6.0 from java1.5.0 + expected = true; + } + return expected; + } + private void verifyOutput(String output) throws DriverException { boolean started = false; StringTokenizer tokenizer = new StringTokenizer(output, "\n"); while (tokenizer.hasMoreTokens()) { String line = tokenizer.nextToken(); - if (line.startsWith("[ChildProcess]") || line.startsWith(VERIFYING)) { + if (isExpectedOutput(line)) { feedback(line); - } else { if (line.startsWith(JYTHON_UP)) { started = true; - feedback(line); - } else { - throw new DriverException(output); } + } else { + throw new DriverException(output); } } if (!started) { @@ -243,6 +252,16 @@ } } + private boolean isExpectedOutput(String line) { + boolean expected = false; + if (line.startsWith("[ChildProcess]") || line.startsWith(VERIFYING)) { + expected = true; + } else if (line.startsWith(JYTHON_UP)) { + expected = true; + } + return expected; + } + private String getTestScript() { StringBuilder b = new StringBuilder(80); b.append("import sys\n"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |