harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r660104 - in /harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution: StressTest.java classloader/LazyClassLoader.java data/LazyTest.java
Date Mon, 26 May 2008 05:41:55 GMT
Author: varlax
Date: Sun May 25 22:41:54 2008
New Revision: 660104

URL: http://svn.apache.org/viewvc?rev=660104&view=rev
Log:
Added class-unloading intensive test, disabled verbose output

Added:
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/StressTest.java
  (with props)
Modified:
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/classloader/LazyClassLoader.java
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyTest.java

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/StressTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/StressTest.java?rev=660104&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/StressTest.java
(added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/StressTest.java
Sun May 25 22:41:54 2008
@@ -0,0 +1,75 @@
+/*
+ *  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.harmony.vm.test.lazyresolution;
+
+import junit.framework.TestSuite;
+import junit.framework.Test;
+
+public class StressTest extends TestSuite {
+    
+    public static final String ITERATIONS = "lazy.test.iterations";
+    public static final String THREADS = "lazy.test.threads";
+
+    /**
+     * @param args
+     */
+    public static void main(String[] args) throws Throwable {
+        int count = 1;
+        try {
+            count = Integer.parseInt(System.getProperty(THREADS));
+        } catch (Exception ignore){}
+        
+        if (--count > 1) {
+            for (int i = 0; i < count; ++i) {
+                new Thread() {
+                    public void run() {
+                        StressTest.runSuite();
+                    }
+                }.start();
+            }
+        }
+        
+        // run in main thread as well
+        runSuite();
+    }
+    
+    public static void runSuite() {
+        junit.textui.TestRunner.run(suite());
+    }
+    
+    public static Test suite() {
+        int count = 10;
+        try {
+            count = Integer.parseInt(System.getProperty(ITERATIONS));
+        } catch (Exception ignore){}
+        
+        TestSuite suite = new TestSuite();
+        for (int i = 0; i < count; ++i) {
+            suite.addTestSuite(AllocationTest.class); 
+            suite.addTestSuite(CallsTest.class);
+            suite.addTestSuite(CastsTest.class);
+            suite.addTestSuite(ClinitTest.class);
+            suite.addTestSuite(FieldsTest.class);
+            suite.addTestSuite(InstanceOfTest.class);
+            suite.addTestSuite(InterfaceCallsTest.class);
+            suite.addTestSuite(OptimizerTest.class);
+            suite.addTestSuite(SignatureTest.class);
+        }
+        return suite;
+    }
+}

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/StressTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/classloader/LazyClassLoader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/classloader/LazyClassLoader.java?rev=660104&r1=660103&r2=660104&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/classloader/LazyClassLoader.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/classloader/LazyClassLoader.java
Sun May 25 22:41:54 2008
@@ -84,7 +84,7 @@
             int readLength = is.read(buf);
             return defineClass(name, buf, 0, length);
         } catch (Throwable t) {
-            t.printStackTrace();
+            //t.printStackTrace();
             throw new ClassNotFoundException("Error while loading class: "+name ,t);
         }
     }
@@ -143,7 +143,7 @@
     }
 
     public void endTest() {
-       System.out.println("loaded:" +loadedInTest);
+       //System.out.println("loaded:" +loadedInTest);
     }
 
     public void assertNumLoads(int expected) {

Modified: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyTest.java?rev=660104&r1=660103&r2=660104&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyTest.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyTest.java
Sun May 25 22:41:54 2008
@@ -18,8 +18,6 @@
 package org.apache.harmony.vm.test.lazyresolution.data;
 
 import org.apache.harmony.vm.test.lazyresolution.classloader.*;
-import java.io.*;
-import java.util.*;
 
 public class LazyTest {
     
@@ -33,7 +31,7 @@
     }
 
     final void endTest() {
-        System.err.println(getClass());
+        //System.err.println(getClass());
         getLazyClassLoader().endTest();
     }
 



Mime
View raw message