< prev index next >

test/jdk/java/lang/System/OsVersionTest.java

Print this page
rev 59105 : imported patch corelibs

*** 39,49 **** public static void main(String args[]) throws Throwable { final String osVersion = System.getProperty("os.version"); if (osVersion == null) { throw new Error("Cant query 'os.version' property!"); } ! if (Platform.isLinux() || Platform.isSolaris()) { OutputAnalyzer output = ProcessTools.executeProcess("uname", "-r"); if (!osVersion.equals(output.getOutput().trim())) { throw new Error(osVersion + " != " + output.getOutput().trim()); } } --- 39,49 ---- public static void main(String args[]) throws Throwable { final String osVersion = System.getProperty("os.version"); if (osVersion == null) { throw new Error("Cant query 'os.version' property!"); } ! if (Platform.isLinux()) { OutputAnalyzer output = ProcessTools.executeProcess("uname", "-r"); if (!osVersion.equals(output.getOutput().trim())) { throw new Error(osVersion + " != " + output.getOutput().trim()); } }
< prev index next >