Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 59765 invoked from network); 10 Feb 2005 20:49:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Feb 2005 20:49:57 -0000 Received: (qmail 58042 invoked by uid 500); 10 Feb 2005 20:49:56 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 58017 invoked by uid 500); 10 Feb 2005 20:49:56 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 58002 invoked by uid 99); 10 Feb 2005 20:49:55 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from e33.co.us.ibm.com (HELO e33.co.us.ibm.com) (32.97.110.131) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 10 Feb 2005 12:49:54 -0800 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e33.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j1AKnoiK273482 for ; Thu, 10 Feb 2005 15:49:51 -0500 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j1AKno3c448338 for ; Thu, 10 Feb 2005 13:49:50 -0700 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j1AKnokT023737 for ; Thu, 10 Feb 2005 13:49:50 -0700 Received: from [9.48.120.204] (sig-9-48-120-204.mts.ibm.com [9.48.120.204]) by d03av04.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j1AKnne5023711 for ; Thu, 10 Feb 2005 13:49:49 -0700 Message-ID: <420BC89A.1020203@Golux.Com> Date: Thu, 10 Feb 2005 12:48:26 -0800 From: myrna User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.1) Gecko/20040707 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Development Subject: [PATCH] test harness fixes Content-Type: multipart/mixed; boundary="------------070208060009030704060807" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --------------070208060009030704060807 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, In the recent set of Patches some things somehow got lost in the shuffle. In this patch I rearranged and tightened some of the skipping code in RunList.java & also removed some currently unused & long dead code. In RunTest.java I made just 1 line adjustment, don't know how the previous cut got checked in (no doubt my mistake) but this is what it was supposed to be. Myrna --------------070208060009030704060807 Content-Type: text/plain; name="tst021005.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tst021005.diff" Index: java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java (revision 153283) +++ java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java (working copy) @@ -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; } - - } } @@ -1074,34 +1096,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) { Class c = null; Index: java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java (revision 153283) +++ java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java (working copy) @@ -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(); --------------070208060009030704060807--