harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r795177 - /harmony/enhanced/classlib/trunk/modules/auth/build.xml
Date Fri, 17 Jul 2009 18:18:34 GMT
Author: hindessm
Date: Fri Jul 17 18:18:34 2009
New Revision: 795177

URL: http://svn.apache.org/viewvc?rev=795177&view=rev
Log:
Run auth tests using hdk.

Modified:
    harmony/enhanced/classlib/trunk/modules/auth/build.xml

Modified: harmony/enhanced/classlib/trunk/modules/auth/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/auth/build.xml?rev=795177&r1=795176&r2=795177&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/auth/build.xml (original)
+++ harmony/enhanced/classlib/trunk/modules/auth/build.xml Fri Jul 17 18:18:34 2009
@@ -56,8 +56,12 @@
     <property file="../../make/depends.properties" />
 
     <property name="tests.hdk.dir" value="${hy.hdk}/build/test/auth" />
+    <property name="tests.resources.hdk.dir"
+              value="${tests.hdk.dir}/resources" />
+    <property name="tests.excludes.hdk.dir" value="${tests.hdk.dir}/excludes" />
     <property name="auth.exclude.file"
               location="${tests.hdk.dir}/test.exclude" />
+    <fileset id="tests" dir="bin/test" />
 
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
@@ -73,7 +77,7 @@
     </target>
 
     <!-- internal target for local and global test run sequence -->
-    <target name="-test-module" depends="build, compile-tests, prepare-exclude, run-tests"
/>
+    <target name="-test-module" depends="build, run-tests" />
     
     <!-- Build native code -->
     <target name="build-native" depends="build-native-all" />
@@ -104,6 +108,7 @@
     <target name="clean">
         <delete file="${hy.jdk}/jre/lib/boot/auth.jar" />
         <delete file="${hy.jdk}/jre/lib/boot/auth-src.jar" />
+        <delete file="${tests.hdk.dir}/mmmmmm_tests.jar" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -168,6 +173,36 @@
         </jar>
     </target>
 
+    <target name="test-jar" depends="svn-info,compile-tests">
+        <mkdir dir="${tests.hdk.dir}" />
+        
+        <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+        
+        <jar destfile="${tests.hdk.dir}/auth_tests.jar">
+            <fileset refid="tests" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
+
+        <copy todir="${tests.resources.hdk.dir}">
+            <fileset dir="src/test/resources" />
+        </copy>
+
+        <mkdir dir="${tests.excludes.hdk.dir}"/>
+        <copy todir="${tests.excludes.hdk.dir}">
+            <fileset dir="./make" includes="exclude*"/>
+            <filterchain>
+                <tokenfilter>
+                    <replaceregex pattern="\.java" replace="\.class" flags="g"/>
+                </tokenfilter>
+            </filterchain>
+        </copy>
+
+        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+    </target>
+
     <target name="compile-tests">
         <compile-tests description="auth api tests"
                        destdir="bin/test">
@@ -180,79 +215,8 @@
         </compile-tests>
     </target>
 
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="auth" dir="./make"
-                             result="${auth.exclude.file}"/>
-    </target>
-
-    <target name="run-tests">
-
-        <mkdir dir="${tests.output}" />
-
-        <property name="test.jre.home" value="${hy.jdk}/jre" />
-
-        <junit fork="yes"
-               forkmode="${hy.test.forkmode}"
-               timeout="${hy.test.timeout}"
-               printsummary="withOutAndErr"
-               errorproperty="test.errors"
-               failureproperty="test.failures"
-               showoutput="on"
-               dir="${basedir}"
-               jvm="${test.jre.home}/bin/java">
-
-            <assertions enableSystemAssertions="true">
-                <enable />
-            </assertions>
-
-            <jvmarg line="${hy.test.vmargs}" />
-            <!-- Used by Support_Exec.execJava() -->
-            <jvmarg value="-Dhy.test.vmargs=${hy.test.vmargs}" />
-
-
-            <!-- to pick up junit.jar -->
-            <jvmarg value="-Xbootclasspath/a:bin/test${path.separator}../../${junit.jar}${path.separator}${hy.hdk}/build/test/support.jar"/>
-
-            <classpath>
-                <pathelement path="src/test/resources"/>
-                <pathelement path="bin/test"/>
-            </classpath>
-
-            <formatter type="xml" />
-
-            <batchtest todir="${tests.output}" haltonfailure="no" >
-
-                <fileset dir="${hy.auth.src.test.java.platform}">
-                    <!-- if ${test.case}     -->
-                    <include name="${converted.tc}" if="test.case" />
-                    <!-- unless ${test.case} -->
-                    <include name="**/*Test.java" unless="test.case" />
-                    <excludesfile name="${auth.exclude.file}" unless="test.case" />
-                </fileset>
-                <fileset dir="src/test/java/common">
-                    <!-- if ${test.case}     -->
-                    <include name="${converted.tc}" if="test.case" />
-                    <!-- unless ${test.case} -->
-                    <include name="**/*Test.java" unless="test.case" />
-                    <excludesfile name="${auth.exclude.file}" unless="test.case" />
-
-                    <!-- Not a test -->
-                    <exclude name="org/apache/harmony/auth/internal/SecurityTest.java"/>
-                </fileset>
-            </batchtest>
-        </junit>
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
-    </target>
-
-    <target name="touch-failures-file" if="test.failures">
-        <echo file="${tests.output}/test.failures"
-            append="true">auth${line.separator}</echo>
-    </target>
-
-    <target name="touch-errors-file" if="test.errors">
-        <echo file="${tests.output}/test.errors"
-            append="true">auth${line.separator}</echo>
+    <target name="run-tests" depends="test-jar">
+        <ant dir="${tests.hdk.dir}" target="test-module" />
     </target>
 
 </project>



Mime
View raw message