db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fuzzylo...@apache.org
Subject svn commit: r153293 - incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
Date Thu, 10 Feb 2005 21:29:00 GMT
Author: fuzzylogic
Date: Thu Feb 10 13:28:59 2005
New Revision: 153293

URL: http://svn.apache.org/viewcvs?view=rev&rev=153293
Log:
Rearrange and tight some of the skipping code in RunList.java.
One line adjustment to RunTest.java (use javavmVersion instead of javaVersion)

Committed for Myrna Van Lunteran <myrna@golux.com>

Modified:
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java?view=diff&r1=153292&r2=153293
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java
(original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java
Thu Feb 10 13:28:59 2005
@@ -949,8 +949,6 @@
 	boolean result = false;
 
 	// figure out if suite should be skipped ... adhoc rules
-	boolean isRmiJdbc = false;
-	boolean isIBridge = false;
 	boolean isJdk12 = false; // really now 'isJdk12orHigher'
 	boolean isJdk14 = false;
 	boolean isJdk15 = false;
@@ -982,19 +980,39 @@
         if ( System.getProperty("java.version").startsWith("1.4.") ) isJdk14 = true;
         if ( System.getProperty("java.version").startsWith("1.5.") ) isJdk15 = 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.
+	// if null, continue in all cases.
+	if (runwithibmjvm != null) 
+	{ 
+	    if (runwithibmjvm.equals("")) { needIBMjvm = null; }
+	    else { needIBMjvm = new Boolean(runwithibmjvm); }
+	}
+	if (runwithibmjvm == null) { needIBMjvm = null; }
+	if (needIBMjvm != null)
+	{
+	    boolean needsibm = needIBMjvm.booleanValue();
+	    boolean ibmjvm = false;
+	    String vendor = System.getProperty("java.vendor");
+	    if (vendor.startsWith("IBM")) { ibmjvm = true; }
+	    if (!needsibm && ibmjvm) { return true; }
+	    if (needsibm && !ibmjvm) { return true; }
+	}
+
+	if (runwithjvm != null && runwithjvm.equals("false"))
+	{
+	    return true;
+	}
+	if (runwithj9 != null && runwithj9.equals("false"))
+	{
+	    return false ;
+	}
+
         if ( (framework != null) && (framework.length()>0) )
 	{
-            if (framework.equals("RmiJdbc"))
-	    { 
-		try {
-			Class.forName("org.objectweb.rmijdbc.Driver");
-		} catch (ClassNotFoundException cnfe) {
-			driverNotFound = true;
-			result = true;
-		}
-            }
-            else if (framework.equals("DerbyNet"))
+            if (framework.equals("DerbyNet"))
 	    {
+		// skip if the derbynet.jar is not in the Classpath
 		try {
 			Class.forName("org.apache.derby.drda.NetworkServerControl");
 		} catch (ClassNotFoundException cnfe) {
@@ -1002,14 +1020,18 @@
 			result = true;
 		}
 
+		// skip if the IBM Universal JDBC Driver is not in the Classpath
+		// note that that driver loads some javax.naming.* classes which may not
+		// be present at runtime, and thus we need to catch a possible error too 
 		try {
 			Class.forName("com.ibm.db2.jcc.DB2Driver");
 		} catch (ClassNotFoundException cnfe) {
 			driverNotFound = true;
 			result = true;
+		} catch (NoClassDefFoundError err) {
+			driverNotFound = true;
+			result = true;
 		}
-
-
 	    }
 	}
 
@@ -1073,34 +1095,6 @@
             }
             if (result) return 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.
-	// if null, continue in all cases.
-	if (runwithibmjvm != null) 
-	{ 
-	    if (runwithibmjvm.equals("")) { needIBMjvm = null; }
-	    else { needIBMjvm = new Boolean(runwithibmjvm); }
-	}
-	if (runwithibmjvm == null) { needIBMjvm = null; }
-	if (needIBMjvm != null)
-	{
-	    boolean needsibm = needIBMjvm.booleanValue();
-	    boolean ibmjvm = false;
-	    String vendor = System.getProperty("java.vendor");
-	    if (vendor.startsWith("IBM")) { ibmjvm = true; }
-	    if (!needsibm && ibmjvm) { return true; }
-	    if (needsibm && !ibmjvm) { return true; }
-	}
-
-	if (runwithjvm != null && runwithjvm.equals("false"))
-	{
-	    return true;
-	}
-	if (runwithj9 != null && runwithj9.equals("false"))
-	{
-	    return false ;
-	}
 
 	if (excludeJCC != null)
 	{

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java?view=diff&r1=153292&r2=153293
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
(original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
Thu Feb 10 13:28:59 2005
@@ -861,7 +861,7 @@
 			javavmVersion = javaVersion;
 
 
-		JavaVersionHolder jvh = new JavaVersionHolder(javaVersion);
+		JavaVersionHolder jvh = new JavaVersionHolder(javavmVersion);
 		majorVersion = jvh.getMajorVersion();
 		minorVersion = jvh.getMinorVersion();
         iminor = jvh.getMinorNumber();



Mime
View raw message