You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by my...@apache.org on 2007/01/16 21:17:07 UTC
svn commit: r496847 - in
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness:
RunList.java RunSuite.java RunTest.java j9_foundation11.java
Author: myrnavl
Date: Tue Jan 16 12:17:06 2007
New Revision: 496847
URL: http://svn.apache.org/viewvc?view=rev&rev=496847
Log:
DERBY-2224 - making old testharness support newer j2ME version
Added:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/j9_foundation11.java (with props)
Modified:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java?view=diff&rev=496847&r1=496846&r2=496847
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java Tue Jan 16 12:17:06 2007
@@ -687,7 +687,7 @@
runwithibmjvm = parentProps.getProperty("runwithibmjvm");
String testJVM = jvmName;
if (jvmName.startsWith("j9"))
- testJVM = (jvmName.equals("j9_foundation") ? "foundation" : "j9");
+ testJVM = (jvmName.startsWith("j9_foundation") ? "foundation" : "j9");
runwithjvm = parentProps.getProperty("runwith" + testJVM);
excludeJCC = parentProps.getProperty("excludeJCC");
}
@@ -712,6 +712,8 @@
if (j9config != null)
if (j9config.equals("foun10"))
jvmName="j9_foundation";
+ else if (j9config.equals("foun11"))
+ jvmName="j9_foundation11";
else if (j9config.equals("max"))
jvmName="j9_13";
if (jversion == null)
@@ -784,7 +786,7 @@
derbyTestingXaSingle = suiteProperties.getProperty("derbyTesting.xa.single");
String testJVM = jvmName;
if (jvmName.startsWith("j9"))
- testJVM = (jvmName.equals("j9_foundation") ? "foundation" : "j9");
+ testJVM = (jvmName.startsWith("j9_foundation") ? "foundation" : "j9");
runwithjvm = suiteProperties.getProperty("runwith" + testJVM);
excludeJCC = suiteProperties.getProperty("excludeJCC");
keepfiles = suiteProperties.getProperty("keepfiles");
@@ -957,7 +959,7 @@
// runwithjvm may be set at the top or just for a subsuite
String testJVM = jvmName;
if (jvmName.startsWith("j9"))
- testJVM = (jvmName.equals("j9_foundation") ? "foundation" : "j9");
+ testJVM = (jvmName.startsWith("j9_foundation") ? "foundation" : "j9");
if ( parentProperties.getProperty("runwith" + testJVM) != null )
p.put("runwith" + testJVM, runwithjvm);
else
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java?view=diff&rev=496847&r1=496846&r2=496847
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java Tue Jan 16 12:17:06 2007
@@ -99,6 +99,8 @@
if (j9config != null)
if (j9config.equals("foun10"))
jvmName="j9_foundation";
+ else if (j9config.equals("foun11"))
+ jvmName="j9_foundation11";
else if (j9config.equals("max"))
jvmName="j9_13";
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java?view=diff&rev=496847&r1=496846&r2=496847
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java Tue Jan 16 12:17:06 2007
@@ -1009,6 +1009,10 @@
{
jvmName = "j9_foundation";
}
+ else if (System.getProperty("com.ibm.oti.configuration").equals("foun11"))
+ {
+ jvmName = "j9_foundation11";
+ }
else
{
// for reporting; first extend javaVersion
@@ -1071,7 +1075,7 @@
upgradetest = true;
}
- if ( framework.equals("DerbyNet") && (! jvmName.equals("j9_foundation")))
+ if ( framework.equals("DerbyNet") && (! jvmName.startsWith("j9_foundation")))
{
Class c = null;
@@ -1691,6 +1695,8 @@
{
if (jvmName.equals("j9_foundation"))
testJVM = "foundation";
+ else if (jvmName.equals("j9_foundation11"))
+ testJVM = "foundation";
else
testJVM = "j9";
}
@@ -2918,10 +2924,10 @@
*/
private static boolean installSecurityManager() throws ClassNotFoundException, IOException
{
- // SecurityManager not currently work with j9 and useProcess=false
+ // SecurityManager not currently work with older j9 and useProcess=false
// need to disable to allow tests to run.
- if (jvmName.startsWith("j9"))
- return false;
+ if (jvmName.startsWith("j9") && (!jvmName.equals("j9_foundation11")))
+ return false;
boolean installedSecurityManager = false;
// Set up the SecurityManager in this JVM for this test.
Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/j9_foundation11.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/j9_foundation11.java?view=auto&rev=496847
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/j9_foundation11.java (added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/j9_foundation11.java Tue Jan 16 12:17:06 2007
@@ -0,0 +1,135 @@
+/*
+
+ Derby - Class org.apache.derbyTesting.functionTests.harness.j9_foundation11
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ */
+
+package org.apache.derbyTesting.functionTests.harness;
+import java.util.Vector;
+import java.util.StringTokenizer;
+import java.util.Properties;
+
+/**
+ <p>This class is for IBM's J9 jdk 1.3., foundation class library; v 2.3 (weme6.1)
+
+ */
+public class j9_foundation11 extends jvm {
+
+ public String getName(){return "j9_foundation11";}
+ public j9_foundation11(boolean noasyncgc, boolean verbosegc, boolean noclassgc,
+ long ss, long oss, long ms, long mx, String classpath, String prof,
+ boolean verify, boolean noverify, boolean nojit, Vector D) {
+ super(noasyncgc,verbosegc,noclassgc,ss,oss,ms,mx,classpath,prof,
+ verify,noverify,nojit,D);
+ }
+ // more typical use:
+ public j9_foundation11(String classpath, Vector D) {
+ super(classpath,D);
+ }
+ // more typical use:
+ public j9_foundation11(long ms, long mx, String classpath, Vector D) {
+ super(ms,mx,classpath,D);
+ }
+ // actual use
+ public j9_foundation11() {
+ Properties sp = System.getProperties();
+ String srvJvm = sp.getProperty("serverJvm");
+ if ((srvJvm!=null) && (srvJvm.toUpperCase().startsWith("J9")))
+ {
+ String wshome = guessWSHome();
+ // note, may have to use separator instead of hardcoding the slashes...
+ setJavaCmd(wshome+"/weme6.1/bin/j9");
+ }
+ else
+ setJavaCmd("j9");
+ }
+
+ // return the command line to invoke this VM. The caller then adds
+ // the class and program arguments.
+ public Vector getCommandLine()
+ {
+ StringBuffer sb = new StringBuffer();
+ Vector v = super.getCommandLine();
+ appendOtherFlags(sb);
+ String s = sb.toString();
+ StringTokenizer st = new StringTokenizer(s);
+ while (st.hasMoreTokens())
+ {
+ v.addElement(st.nextToken());
+ }
+ return v;
+ }
+
+ public void appendOtherFlags(StringBuffer sb)
+ {
+ Properties sp = System.getProperties();
+ String bootcp = sp.getProperty("bootcp");
+ String srvJvm = sp.getProperty("serverJvm");
+ // if we're coming in to be the server jvm for networkserver testing on j9,
+ // bootcp is null, so we need to try to setup the bootclasspath from scratch
+ // for now, assume we're only interested in doing this for weme6.1_foundation, worry about
+ // newer versions, multiple class libraries, or multiple releases later.
+ sb.append(" -jcl:foun11");
+
+ if ((srvJvm !=null ) && (srvJvm.toUpperCase().startsWith("J9")))
+ {
+ String pathsep = System.getProperty("path.separator");
+ String wshome = guessWSHome();
+ // note, assuming jclFoundation classes sit under weme6.1/lib/jclFoundation11
+ // and that jdbc.jar sits under weme6.1/lib
+ // note, may have to switch to sep instead of hardcoding the slashes...
+ sb.append(" -Xbootclasspath/a:" + wshome + "/weme6.1/lib/jclFoundation11/classes.zip"
+ + pathsep + wshome + "/weme6.1/lib/jclFoundation11/locale.zip"
+ + pathsep + wshome + "/weme6.1/lib/jdbc.jar");
+ }
+ else
+ sb.append(" -Xbootclasspath/a:" + bootcp);
+ if (noasyncgc) warn("j9_foundation does not support noasyncgc");
+ if (verbosegc) sb.append(" -verbose:gc");
+ if (noclassgc) warn("j9_foundation does not support noclassgc");
+ if (ss>=0) warn("j9_foundation does not support ss");
+ if (oss>=0) warn("j9_foundation does not support oss");
+ if (ms>=0) {
+ sb.append(" -Xss");
+ sb.append(ms);
+ //sb.append("k");
+ }
+ if (mx>=0) {
+ sb.append(" -Xmx");
+ sb.append(mx);
+ //sb.append("k");
+ }
+ if (classpath!=null) warn("j9_foundation does not support classpath, use -Xbootclasspath,-Xbootclasspath/p,-Xbootclasspath/a");
+ if (prof!=null) warn("j9_foundation does not support prof");
+ if (verify) sb.append(" -verify");
+ if (noverify) warn("j9_foundation does not support noverify");
+ if (nojit) sb.append(" -Xnojit");
+ if (D != null)
+ for (int i=0; i<D.size();i++) {
+ sb.append(" -D");
+ sb.append((String)(D.elementAt(i)));
+ }
+ }
+ public String getDintro() { return "-D"; }
+
+// protected void setSecurityProps()
+// {
+// System.out.println("Note: J9 (foundation) tests do not run with security manager");
+// }
+
+}
Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/j9_foundation11.java
------------------------------------------------------------------------------
svn:eol-style = native