You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/08/19 13:34:10 UTC

svn commit: r805752 - in /commons/sandbox/runtime/trunk: build.xml src/test/org/apache/commons/runtime/TestChild.java src/test/org/apache/commons/runtime/TestChildMain.java

Author: mturk
Date: Wed Aug 19 11:34:09 2009
New Revision: 805752

URL: http://svn.apache.org/viewvc?rev=805752&view=rev
Log:
Launch second parallel (child) test task

Added:
    commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestChild.java   (with props)
    commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestChildMain.java   (with props)
Modified:
    commons/sandbox/runtime/trunk/build.xml

Modified: commons/sandbox/runtime/trunk/build.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/build.xml?rev=805752&r1=805751&r2=805752&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/build.xml (original)
+++ commons/sandbox/runtime/trunk/build.xml Wed Aug 19 11:34:09 2009
@@ -34,6 +34,7 @@
     <property name="docs.dest.print" value="${dist.root}/doc/printable"/>
     <property name="test.runner" value="junit.textui.TestRunner"/>
     <property name="test.entry" value="org.apache.commons.runtime.TestAll"/>
+    <property name="test.child" value="org.apache.commons.runtime.TestChild"/>
     <property name="test.dir" value="${build.dest}/test"/>
     <property name="examples.dir" value="${build.dest}/examples"/>
     <property name="example" value="Unknown"/>
@@ -297,7 +298,21 @@
     <!-- Junit tests                                                         -->
     <!-- =================================================================== -->
     <target name="test" depends="tests">
-        <echo message="Running Commons Runtime package tests ..."/>
+        <parallel>
+        <sequential>
+        <echo message="Running Child Commons Runtime package tests ..."/>
+        <java dir="${test.dir}" classname="${test.child}" fork="yes"
+              failonerror="${test.failonerror}">
+            <classpath refid="test.classpath"/>
+            <env key="PATH" path="${runtime.library.path}${path.separator}${java.library.path}"/>
+            <env key="Path" path="${runtime.library.path}${path.separator}${java.library.path}"/>
+            <jvmarg value="-Djava.library.path=${runtime.library.path}"/>
+            <jvmarg value="-Xmx512m"/>
+        </java>
+        </sequential>
+        <sequential>
+        <echo message="Running Main Commons Runtime package tests ..."/>
+        <sleep seconds="2" />
         <java dir="${test.dir}" classname="${test.entry}" fork="yes"
               failonerror="${test.failonerror}">
             <classpath refid="test.classpath"/>
@@ -306,13 +321,31 @@
             <jvmarg value="-Djava.library.path=${runtime.library.path}"/>
             <jvmarg value="-Xmx512m"/>
         </java>
+        </sequential>
+        <echo message="Started Commons Runtime package tests ..."/>
+        </parallel>
     </target>
 
     <!-- =================================================================== -->
     <!-- Junit tests for 64-bit JVM                                          -->
     <!-- =================================================================== -->
     <target name="test64" depends="tests">
-        <echo message="Running Commons Runtime package tests ..."/>
+        <parallel>
+        <sequential>
+        <echo message="Running Child Commons Runtime package tests (64-bit) ..."/>
+        <java dir="${test.dir}" classname="${test.child}" fork="yes"
+              failonerror="${test.failonerror}">
+            <classpath refid="test.classpath"/>
+            <env key="PATH" path="${runtime.library.path}${path.separator}${java.library.path}"/>
+            <env key="Path" path="${runtime.library.path}${path.separator}${java.library.path}"/>
+            <jvmarg value="-Djava.library.path=${runtime.library.path}"/>
+            <jvmarg value="-Xmx512m"/>
+            <jvmarg value="-d64"/>
+        </java>
+        </sequential>
+        <sequential>
+        <echo message="Running Main Commons Runtime package tests (64-bit) ..."/>
+        <sleep seconds="2" />
         <java dir="${test.dir}" classname="${test.entry}" fork="yes"
               failonerror="${test.failonerror}">
             <classpath refid="test.classpath"/>
@@ -322,6 +355,9 @@
             <jvmarg value="-Xmx512m"/>
             <jvmarg value="-d64"/>
         </java>
+        </sequential>
+        <echo message="Started Commons Runtime package tests (64-bit) ..."/>
+        </parallel>
     </target>
 
     <!-- =================================================================== -->

Added: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestChild.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestChild.java?rev=805752&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestChild.java (added)
+++ commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestChild.java Wed Aug 19 11:34:09 2009
@@ -0,0 +1,46 @@
+/* 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.commons.runtime;
+import junit.framework.*;
+
+/**
+ * Child test task.
+ */
+public class TestChild extends TestCase
+{
+
+    public TestChild(String testName)
+    {
+        super(testName);
+    }
+
+    public static Test suite()
+    {
+        TestSuite suite = new TestSuite();
+        // Fundamentals
+        suite.addTest(TestChildMain.suite());
+        suite.addTest(TestOS.suite());
+        return suite;
+    }
+
+    public static void main(String args[])
+    {
+        String[] testCaseName = { TestChild.class.getName() };
+        junit.textui.TestRunner.main(testCaseName);
+    }
+
+}

Propchange: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestChild.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestChildMain.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestChildMain.java?rev=805752&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestChildMain.java (added)
+++ commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestChildMain.java Wed Aug 19 11:34:09 2009
@@ -0,0 +1,63 @@
+/* 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.commons.runtime;
+
+import java.lang.System;
+import junit.framework.*;
+
+import org.apache.commons.runtime.io.Status;
+import org.apache.commons.runtime.net.OpenSSL;
+
+
+/**
+ * Child Main Test.
+ *
+ */
+public class TestChildMain extends TestCase
+{
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite(TestChildMain.class);
+        return suite;
+    }
+
+    protected void setUp()
+        throws Exception
+    {
+        System.loadLibrary("acr");
+        if (OpenSSL.SUPPORTED) {
+            // Load the ssl library if compiled in
+            System.loadLibrary("acrssl");
+        }
+    }
+
+    public void testRunning()
+        throws Exception
+    {
+        System.out.println();
+        System.out.println("Running Child TestSuite");
+    }
+
+    public void testNativeInit()
+        throws Throwable
+    {
+        boolean rv = Native.initialize();
+        assertTrue("Not initialized", rv);
+    }
+
+}
+

Propchange: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestChildMain.java
------------------------------------------------------------------------------
    svn:eol-style = native