commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1084870 - in /commons/sandbox/runtime/trunk: ./ lib/ src/main/java/org/apache/commons/runtime/exception/ src/main/test/ src/main/test/org/ src/main/test/org/apache/ src/main/test/org/apache/commons/ src/main/test/org/apache/commons/runtime/
Date Thu, 24 Mar 2011 08:06:52 GMT
Author: mturk
Date: Thu Mar 24 08:06:51 2011
New Revision: 1084870

URL: http://svn.apache.org/viewvc?rev=1084870&view=rev
Log:
Use testng instead junit

Added:
    commons/sandbox/runtime/trunk/lib/
    commons/sandbox/runtime/trunk/lib/testng-6.0.jar   (with props)
    commons/sandbox/runtime/trunk/src/main/test/
    commons/sandbox/runtime/trunk/src/main/test/org/
    commons/sandbox/runtime/trunk/src/main/test/org/apache/
    commons/sandbox/runtime/trunk/src/main/test/org/apache/commons/
    commons/sandbox/runtime/trunk/src/main/test/org/apache/commons/runtime/
Modified:
    commons/sandbox/runtime/trunk/build.xml
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/Native.java

Modified: commons/sandbox/runtime/trunk/build.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/build.xml?rev=1084870&r1=1084869&r2=1084870&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/build.xml (original)
+++ commons/sandbox/runtime/trunk/build.xml Thu Mar 24 08:06:51 2011
@@ -34,18 +34,16 @@
     <property name="build.package.name" value="org.apache.commons.runtime"/>
     <property name="docs.dest" value="${build.dir}/doc"/>
     <property name="docs.dest.print" value="${docs.dest}/printable"/>
-    <property name="test.runner" value="junit.textui.TestRunner"/>
+    <property name="test.runner" value="org.testng.TestNG"/>
     <property name="test.entry" value="${build.package.name}.TestAll"/>
     <property name="test.child" value="${build.package.name}.TestChild"/>
     <property name="test.dir" value="${build.dest}/test"/>
     <property name="examples.dir" value="${build.dest}/examples"/>
     <property name="example" value="Unknown"/>
-    <property name="junit.home" value="${basedir}/lib"/>
-    <property name="junit.jar" value="${junit.home}/junit-4.5.jar"/>
-    <property name="commons-logging.home" value="${basedir}/lib"/>
-    <property name="commons-logging.jar" value="${commons-logging.home}/commons-logging-1.1.1.jar"/>
+    <property name="testng.home" value="${basedir}/lib"/>
+    <property name="testng.jar" value="${testng.home}/testng-6.0.jar"/>
     <property name="runtime.libname" value="libacr"/>
-    <property name="runtime.library.path" value="${src.native}"/>
+    <property name="runtime.library.path" value="${src.native}/.libs"/>
 
     <property name="compile.source" value="1.6"/>
     <property name="compile.target" value="1.6"/>
@@ -69,8 +67,7 @@
     <path id="test.classpath">
         <pathelement location="${build.dest}/java"/>
         <pathelement location="${build.dest}/test"/>
-        <pathelement location="${junit.jar}"/>
-        <pathelement location="${commons-logging.jar}"/>
+        <pathelement location="${testng.jar}"/>
     </path>
 
     <!-- Ant tasks classpath -->
@@ -344,7 +341,7 @@ The Apache Software Foundation (http://w
         <mkdir dir="${build.dest}/test"/>
         <mkdir dir="${build.src}/test"/>
         <copy todir="${build.src}/test" filtering="yes">
-            <fileset dir="${src.base}/test">
+            <fileset dir="${src.base}/main/test">
                 <include name="**/*.java"/>
                 <include name="**/*.xml"/>
                 <include name="**/*.properties"/>
@@ -360,40 +357,25 @@ The Apache Software Foundation (http://w
             includeantruntime="false">
             <classpath refid="test.classpath"/>
         </javac>
+        <taskdef name="testng"
+            classname="org.testng.TestNGAntTask">
+            <classpath refid="test.classpath"/>
+        </taskdef>
     </target>
 
     <!-- =================================================================== -->
     <!-- Junit tests                                                         -->
     <!-- =================================================================== -->
     <target name="test" depends="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"/>
-                    <jvmarg line="${args}"/>
-                </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"/>
-                    <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 line="${args}"/>
-                </java>
-            </sequential>
-            <echo message="Started Commons Runtime package tests ..."/>
-        </parallel>
+        <testng outputdir="${build.dir}/out">
+            <classpath refid="test.classpath"/>
+            <classfileset dir="${build.dest}/test" includes="**/*.class"/>
+            <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 line="${args}"/>
+        </testng>
     </target>
 
     <!-- =================================================================== -->

Added: commons/sandbox/runtime/trunk/lib/testng-6.0.jar
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/lib/testng-6.0.jar?rev=1084870&view=auto
==============================================================================
Binary file - no diff available.

Propchange: commons/sandbox/runtime/trunk/lib/testng-6.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/Native.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/Native.java?rev=1084870&r1=1084869&r2=1084870&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/Native.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/Native.java
Thu Mar 24 08:06:51 2011
@@ -22,7 +22,7 @@ package org.apache.commons.runtime.excep
  * @author Mladen Turk
  *
  */
-protected class Native
+class Native
 {
 
     private static native String str0(int err);



Mime
View raw message