harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r499859 - in /harmony/enhanced/drlvm/trunk/src/test/regression/H2083: ./ Test.java run.test.xml
Date Thu, 25 Jan 2007 17:15:42 GMT
Author: gshimansky
Date: Thu Jan 25 09:15:39 2007
New Revision: 499859

URL: http://svn.apache.org/viewvc?view=rev&rev=499859
Log:
Applied HARMONY-2721 [drlvm][test] Add test in HARMONY-2083 to regression test stuite

The test is added. It is running in 3 modes, JET, OPT and interpreter. On
interpreter it crashes somewhere inside of interpreter code. This crash
seems to be separate from the classloader bugs.


Added:
    harmony/enhanced/drlvm/trunk/src/test/regression/H2083/
    harmony/enhanced/drlvm/trunk/src/test/regression/H2083/Test.java   (with props)
    harmony/enhanced/drlvm/trunk/src/test/regression/H2083/run.test.xml   (with props)

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H2083/Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H2083/Test.java?view=auto&rev=499859
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H2083/Test.java (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H2083/Test.java Thu Jan 25 09:15:39 2007
@@ -0,0 +1,38 @@
+package org.apache.harmony.drlvm.tests.regression.h2083;
+
+import junit.framework.TestCase;
+
+public class Test extends TestCase {
+    static final int N_THREADS = 100;
+    static final int N_ITERS = 500;
+
+    public void test() throws Exception {
+        Thread threads[] = new Thread[N_THREADS];
+
+        for (int i = 0; i < N_THREADS; i++)
+            threads[i] = new TestThread();
+
+        System.out.println("START");
+        for (int i = 0; i < N_THREADS; i++)
+            threads[i].start();
+
+        System.out.println("JOIN");
+        for (int i = 0; i < N_THREADS; i++)
+            threads[i].join();
+
+        System.out.println("PASSED");
+    }
+}
+
+class TestThread extends Thread {
+    public void run() {
+        for (int i = 0; i < Test.N_ITERS; i++) {
+            try {
+                new Missed();
+            } catch (Throwable e) {}
+        }
+    }
+}
+
+class Missed {
+}

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H2083/Test.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H2083/run.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H2083/run.test.xml?view=auto&rev=499859
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H2083/run.test.xml (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H2083/run.test.xml Thu Jan 25 09:15:39
2007
@@ -0,0 +1,24 @@
+<project name="RUN HARMONY-2083 Regression Test">
+    <target name="run-test">
+        <!-- extend JUnit test launcher to run JNI test -->
+        <delete
+             file="${reg.test.class.path}/org/apache/harmony/drlvm/tests/regression/h2083/Missed.class"
+             verbose="true"/>
+        <echo message="Running on JET"/>
+        <run-junit-test 
+             test="org.apache.harmony.drlvm.tests.regression.h2083.Test"
+             vmarg="-Xem:jet">
+        </run-junit-test>
+        <echo message="Running on OPT"/>
+        <run-junit-test 
+             test="org.apache.harmony.drlvm.tests.regression.h2083.Test"
+             vmarg="-Xem:opt">
+        </run-junit-test>
+        <echo message="Running on interpreter"/>
+        <run-junit-test 
+             test="org.apache.harmony.drlvm.tests.regression.h2083.Test"
+             vmarg="-Xint">
+        </run-junit-test>
+    </target>
+</project>
+

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H2083/run.test.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message