db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1848004 - in /db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness: RunList.java RunSuite.java RunTest.java
Date Sun, 02 Dec 2018 15:28:49 GMT
Author: rhillegas
Date: Sun Dec  2 15:28:49 2018
New Revision: 1848004

URL: http://svn.apache.org/viewvc?rev=1848004&view=rev
Log:
DERBY-6998: Make it possible to run old harness tests on JDK 10 again; commit derby-6998-05-ab-use-java.specification.version.diff.

Modified:
    db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunList.java
    db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunSuite.java
    db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunTest.java

Modified: db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunList.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunList.java?rev=1848004&r1=1848003&r2=1848004&view=diff
==============================================================================
--- db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunList.java
(original)
+++ db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunList.java
Sun Dec  2 15:28:49 2018
@@ -54,12 +54,13 @@ import org.apache.derbyTesting.functionT
 
 public class RunList
 {
+    public static final String SPEC_VERSION = "java.specification.version";
 
 	static String jvmName = "currentjvm";
 	static String javaCmd = "java";
 	static String javaArgs;
 	static jvm jvm;
-	static String javaVersion; // System.getProperty("java.version")
+	static String javaVersion; // System.getProperty("java.specification.version")
 	static String majorVersion;
 	static String minorVersion;
 	static String jversion; // to pass jvm to RunTest as -Djvm=1.2 etc.
@@ -739,10 +740,7 @@ public class RunList
 			else if (j9config.equals("dee"))
 				jvmName="j9dee15";
 
-		if (jversion == null)
-		    javaVersion = System.getProperty("java.version");
-		else
-		    javaVersion = jversion;
+        javaVersion = System.getProperty(SPEC_VERSION);
 		    
 		//System.out.println("RunList setTopSuiteProperties javaVersion: " + javaVersion);
 
@@ -752,12 +750,7 @@ public class RunList
 		else if (javaCmd.equals("jview"))
 		    jvmName = "jview";
 
-		// if j9, we need to check further
-		String javavmVersion;
-		if (System.getProperty("java.vm.name").equals("J9"))
-			javavmVersion = (System.getProperty("java.vm.version"));
-		else
-			javavmVersion = javaVersion;
+        String javavmVersion = javaVersion;
 
 
         JavaVersionHolder jvh = new JavaVersionHolder(javavmVersion);
@@ -779,7 +772,7 @@ public class RunList
 			javaVersion = javaVersion + " - " + majorVersion + "." + minorVersion;
 			System.out.println("javaVersion now: " + javaVersion);
 			// up to j9 2.1 (jdk 1.3.1. subset) the results are the same for all versions, or
-			// we don't care about it anymore. So switch back to 1.3 (java.version values).
+			// we don't care about it anymore. So switch back to 1.3 (java.specification.version values).
 			if ((imajor <= 2) && (iminor < 2))
 			{
 				majorVersion = "1";
@@ -1124,8 +1117,6 @@ public class RunList
 
 	// Determine if this is jdk12 or higher (with or without extensions)
     if (iminor >= 2) isJdk12 = true;
-	if ( System.getProperty("java.version").startsWith("1.1.8") ) isJdk118 = true;
-    if ( System.getProperty("java.version").startsWith("1.1.7") ) isJdk117 = true;
     
 	// if a test needs an ibm jvm, skip if runwithibmjvm is true.
 	// if a test needs to not run in an ibm jvm, skip if runwithibmjvm is false.

Modified: db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunSuite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunSuite.java?rev=1848004&r1=1848003&r2=1848004&view=diff
==============================================================================
--- db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunSuite.java
(original)
+++ db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunSuite.java
Sun Dec  2 15:28:49 2018
@@ -292,7 +292,7 @@ public class RunSuite
             jvmName = p.getProperty("jvm");
 		    if ( (jvmName == null) || (jvmName.length()==0) )
 		    {
-		        javaVersion = System.getProperty("java.version");
+		        javaVersion = System.getProperty(RunList.SPEC_VERSION);
 		    }
 		    else
 		        javaVersion = jvmName;

Modified: db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunTest.java?rev=1848004&r1=1848003&r2=1848004&view=diff
==============================================================================
--- db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunTest.java
(original)
+++ db/derby/code/trunk/java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/harness/RunTest.java
Sun Dec  2 15:28:49 2018
@@ -972,7 +972,7 @@ public class RunTest
 		//System.out.println("jvmName is: " + jvmName);
 		if ( (jvmName == null) || (jvmName.length()==0) || (jvmName.equals("jview")))
 		{
-		    javaVersion = System.getProperty("java.version");
+		    javaVersion = System.getProperty(RunList.SPEC_VERSION);
 		    //System.out.println("javaVersion is: " + javaVersion);
 		}
 		else
@@ -1040,7 +1040,7 @@ public class RunTest
 
         // create a JavaVersionHolder for the java.specification.version - 
         // used to control Sed-ing for JDBC4 & up
-        String specversion = (sp.getProperty("java.specification.version"));
+        String specversion = (sp.getProperty(RunList.SPEC_VERSION));
         JavaVersionHolder jvhs = new JavaVersionHolder(specversion);
 
         testEncoding = sp.getProperty("derbyTesting.encoding");



Mime
View raw message