From: Kabir K. <kk...@jb...> - 2006-07-10 21:27:15
|
User: kkhan Date: 06/07/10 17:27:12 Modified: jboss-aop build-tests-jdk50.xml Log: Continue with the retro stuff Revision Changes Path 1.2 +135 -199 jboss-aop/build-tests-jdk50.xml (In the diff below, changes in quantity of whitespace are not shown.) Index: build-tests-jdk50.xml =================================================================== RCS file: /cvsroot/jboss/jboss-aop/build-tests-jdk50.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- build-tests-jdk50.xml 10 Jul 2006 20:48:49 -0000 1.1 +++ build-tests-jdk50.xml 10 Jul 2006 21:27:12 -0000 1.2 @@ -14,7 +14,7 @@ <!-- --> <!-- ====================================================================== --> -<!-- $Id: build-tests-jdk50.xml,v 1.1 2006/07/10 20:48:49 kkhan Exp $ --> +<!-- $Id: build-tests-jdk50.xml,v 1.2 2006/07/10 21:27:12 kkhan Exp $ --> <project default="main" name="JBoss/AOP"> @@ -119,14 +119,7 @@ <property name="build.reports" value="${module.output}/reports"/> <property name="build.stylesheets" value="${module.output}/stylesheets"/> <property name="build.tests.classes" value="${module.output}/tests.classes"/> - <property name="build15.classes" value="${module.output}/classes15"/> - <property name="build15.tests.classes" value="${module.output}/tests.classes15"/> <property name="build.lib" value="${module.output}/lib"/> - <property name="build.api" value="${module.output}/api"/> - <property name="build.etc" value="${module.output}/etc"/> - <property name="build.gen-src" value="${module.output}/gen-src"/> - <property name="build.gen" value="${module.output}/gen"/> - <property name="build.bootclasspath" value="${module.output}/gen-bootclasspath"/> <!-- Install/Release structure --> <property name="install.id" value="${module.name}-${module.version}"/> @@ -161,6 +154,11 @@ <pathelement path="${build.lib}/jboss-aop-jdk50.jar"/> </path> + <path id="test.jrockit.classpath"> + <path refid="test.classpath"/> + <path path="${jrockit.home}/jre/lib/managementapi.jar"/> + </path> + <!-- The classpath required to build javadocs. --> <path id="javadoc.classpath"> <path refid="javac.classpath"/> @@ -214,96 +212,6 @@ </target> <!-- ================================================================== --> - <!-- Install & Release --> - <!-- ================================================================== --> - - <target name="dist" depends="javadocs, init"> - <fail unless="JROCKIT_AVAILABLE"> - To build a distribution you must have a version of JRockit available and set the jrockit.home property. - </fail> - - <copy todir="${build.lib}" filtering="no"> - <fileset dir="${jboss.common.lib}"> - <include name="jboss-common.jar"/> - </fileset> - </copy> - <copy todir="${build.lib}" filtering="no"> - <fileset dir="${javassist.lib}"> - <include name="javassist.jar"/> - </fileset> - </copy> - <copy todir="${build.lib}" filtering="no"> - <fileset dir="${trove.lib}"> - <include name="trove.jar"/> - </fileset> - </copy> - <copy todir="${build.lib}" filtering="no"> - <fileset dir="${oswego.concurrent.lib}"> - <include name="concurrent.jar"/> - </fileset> - </copy> - <copy todir="${build.lib}" filtering="no"> - <fileset dir="${qdox.qdox.lib}"> - <include name="qdox.jar"/> - </fileset> - </copy> - <copy todir="${build.lib}" filtering="no"> - <fileset dir="${junit.junit.lib}"> - <include name="junit.jar"/> - </fileset> - </copy> - <copy todir="docs" filtering="no"> - <fileset dir="output"> - <include name="api/**"/> - </fileset> - </copy> - <delete file="jboss-aop-dist.zip"/> - <zip zipfile="jboss-aop-dist.zip"> - <zipfileset dir="${build.lib}" prefix="${aop.version}"> - <include name="*.jar"/> - </zipfileset> - <zipfileset dir="." prefix="${aop.version}"> - <include name="docs/api/**"/> - <include name="docs/**/*.html"/> - <include name="docs/**/*.jpg"/> - <include name="docs/examples/**"/> - <exclude name="docs/**/CVS/**"/> - <exclude name="docs/**/*.wiki"/> - </zipfileset> - <zipfileset dir="." prefix="${aop.version}"> - <include name="RELEASE_NOTES.txt"/> - <include name="src/main/**/*.java"/> - <include name="src/resources/test/**/*.xml"/> - <exclude name="src/**/CVS/**"/> - </zipfileset> - <zipfileset file="src/build.xml" prefix="${aop.version}"/> - </zip> - </target> - - <target name="install" - description="Install the structure for a release." - depends="all, _buildmagic:install:default"/> - - <target name="release" depends="install"/> - - <target name="release-zip" - description="Builds a ZIP distribution." - depends="release, _buildmagic:release:zip"/> - - <target name="release-tar" - description="Builds a TAR distribution." - depends="release, _buildmagic:release:tar"/> - - <target name="release-tgz" - description="Builds a TAR-GZ distribution." - depends="release, _buildmagic:release:tgz"/> - - <target name="release-all" - description="Builds a distribution for each archive type." - depends="release-zip, release-tgz"/> - - - <!-- ================================================================== --> <!-- Cleaning --> <!-- ================================================================== --> @@ -343,7 +251,7 @@ depends="_buildmagic:help:standard"/> <!-- ==================================================================================== --> - <!-- JDK 1.4 TESTS --> + <!-- JDK 5.0 TESTS --> <!-- ==================================================================================== --> <target name="tests" depends="main"> @@ -351,13 +259,10 @@ <delete dir="${build.tests.classes}"/> <antcall target="javaagent-genadvisor-tests" inheritRefs="true"/> <antcall target="javaagent-tests" inheritRefs="true"/> + <antcall target="system-classloader-test" inheritRefs="true"/> <antcall target="not-woven-tests" inheritRefs="true"/> - <delete dir="${build.tests.classes}"/> - <antcall target="jrockit-loadtime-tests" inheritRefs="true"/> - - <delete dir="${build.tests.classes}"/> <antcall target="precompiled-tests" inheritRefs="true"/> <delete dir="${build.tests.classes}"/> @@ -365,6 +270,18 @@ <delete dir="${build.tests.classes}"/> <antcall target="non-optimized-precompiled-tests" inheritRefs="true"/> + + <!-- Should move the remaining tests into something similar to _base-tests.xml and run them from the main targets once JBAOP-268 has been done --> + <delete dir="${build.tests.classes}/org/jboss/test"/> + <antcall target="jdk15-loadtime-tests" inheritRefs="true"/> + + <delete dir="${build.tests.classes}/org/jboss/test"/> + <antcall target="jdk15-precompiled-tests" inheritRefs="true"/> + + <delete dir="${build.tests.classes}"/> + <antcall target="jrockit-tests" inheritRefs="true"/> + <antcall target="jrockit-genadvisor-tests" inheritRefs="true"/> + </target> <!-- ==================================================================================== --> @@ -407,7 +324,7 @@ </target> <!-- ==================================================================================== --> - <!-- JDK 1.4 BOOTCLASSPATH TEST COMMONS --> + <!-- JDK 5.0 JAVAAGENT TEST COMMONS --> <!-- These targets should not be called directly, use bootclasspath-tests or --> <!-- bootclasspath-genadvisor-tests --> <!-- ==================================================================================== --> @@ -460,6 +377,7 @@ <jvmarg value="${jboss.aop.class.path}"/> <jvmarg value="${jboss.aop.path}"/> <sysproperty key="jboss.aop.instrumentor" value="${instrumentor}"/> + <sysproperty key="jboss.aop.debug.classes" value="true"/> <formatter type="plain" extension="-${caller}.txt"/> <classpath refid="test.classpath"/> <formatter type="xml" extension="-${caller}.xml"/> @@ -484,7 +402,7 @@ </target> <!-- ==================================================================================== --> - <!-- OPTIMIZED PRECOMPILED TESTS (JDK 1.4) --> + <!-- OPTIMIZED PRECOMPILED TESTS (JDK 5.0) --> <!-- ==================================================================================== --> <target name="precompiled-tests" depends="compile-test-classes"> @@ -497,8 +415,9 @@ </path> <!-- Add tests in _base-precompiled-tests unless they should only be run in this weaving mode --> - <antcall target="_base-precompiled-tests" inheritRefs="true"> + <antcall target="_base-tests" inheritRefs="true"> <param name="caller" value="precompiled-tests"/> + <param name="test-target" value="_run-precompiled-test"/> </antcall> <!-- Tests only applicable for this weaving mode --> @@ -516,7 +435,7 @@ </target> <!-- ==================================================================================== --> - <!-- NON OPTIMIZED PRECOMPILED TESTS (JDK 1.4) --> + <!-- NON OPTIMIZED PRECOMPILED TESTS (JDK 5.0) --> <!-- ==================================================================================== --> <target name="non-optimized-precompiled-tests" depends="compile-test-classes"> @@ -529,8 +448,9 @@ </path> <!-- Add tests in _base-precompiled-tests unless they should only be run in this weaving mode --> - <antcall target="_base-precompiled-tests" inheritRefs="true"> + <antcall target="_base-tests" inheritRefs="true"> <param name="caller" value="non-optimized-precompiled-tests"/> + <param name="test-target" value="_run-precompiled-test"/> </antcall> <!-- Tests only applicable for this weaving mode --> @@ -542,7 +462,7 @@ </target> <!-- ==================================================================================== --> - <!-- JDK 1.5 GENERATED ADVISOR PRECOMPILED TESTS --> + <!-- JDK 5.0 GENERATED ADVISOR PRECOMPILED TESTS --> <!-- ==================================================================================== --> <target name="precompiled-genadvisor-tests" depends="compile-test-classes"> @@ -555,8 +475,9 @@ </path> <!-- Add tests in _base-precompiled-tests unless they should only be run in this weaving mode --> - <antcall target="_base-precompiled-tests" inheritRefs="true"> + <antcall target="_base-tests" inheritRefs="true"> <param name="caller" value="precompiled-genadvisor-tests"/> + <param name="test-target" value="_run-precompiled-test"/> </antcall> <!-- Tests only applicable for this weaving mode --> @@ -579,7 +500,6 @@ </antcall> </target> - <target name="precompiled-test" depends="init"> <taskdef name="aopc" classname="org.jboss.aop.ant.AopC" classpathref="jboss.aop.classpath"/> <antcall target="_run-precompiled-test" inheritRefs="true"> @@ -635,6 +555,7 @@ <!-- aopc --> <aopc optimized="${optimized}" compilerclasspathref="aop.task.classpath"> <classpath refid="aop.task.classpath"/> + <classpath refid="test.classpath"/> <classpath path="${build.tests.classes}"/> <aoppath path="${aoppath}"/> <sysproperty key="jboss.aop.instrumentor" value="${instrumentor}"/> @@ -670,11 +591,11 @@ <!-- determine output directory from weaving mode --> <mkdir dir="${build.reports}"/> - <junit printsummary="yes" fork="no" haltonfailure="no"> + <junit printsummary="yes" fork="yes" haltonfailure="no"> <jvmarg value="${jboss.aop.path}"/> <jvmarg value="${jboss.aop.class.path}"/> - <formatter type="plain" extension="-${caller}.txt"/> - <formatter type="xml" extension="-${caller}.xml"/> + <formatter type="plain" extension="-${caller}-jdk50.txt"/> + <formatter type="xml" extension="-${caller}-jdk50.xml"/> <classpath> <path refid="test.classpath"/> <pathelement location="${build.tests.classes}"/> @@ -721,8 +642,8 @@ <pathelement location="${build.tests.classes}"/> <pathelement location="docs"/> </classpath> - <formatter type="plain"/> - <formatter type="xml"/> + <formatter type="plain" extension="-jdk50.txt"/> + <formatter type="xml" extension="-jdk50.xml"/> <batchtest todir="${build.reports}" haltonerror="false" @@ -742,21 +663,11 @@ <!-- JDK 5 TESTS --> <!-- ==================================================================================== --> - <target name="jdk15-tests"> - <delete dir="${build.tests.classes}/org/jboss/test"/> - <antcall target="jdk15-loadtime-tests" inheritRefs="true"/> - - <delete dir="${build.tests.classes}/org/jboss/test"/> - <antcall target="jdk15-precompiled-tests" inheritRefs="true"/> - </target> - <target name="jdk15-loadtime-tests" depends="compile"> <property name="report.dir" value="${build.reports}"/> <mkdir dir="${report.dir}"/> - -<!-- <junit printsummary="yes" fork="yes" haltonfailure="no"> <sysproperty key="jboss.aop.path" value="${source.res}/test/jdk15/dynamic/prepareAll/jboss-aop.xml"/> <sysproperty key="scenario.jar" value="${build.tests.classes}/org/jboss/test/aop/jdk15/dynamic/common/scenario.jar"/> @@ -854,7 +765,7 @@ <formatter usefile="true" type="xml" extension="-jdk15-loadtime-tests.xml"/> <test todir="${report.dir}" name="org.jboss.test.aop.jdk15.dynamic.prepareFieldSet.HotSwapDisabledTester" /> </junit> ---> + </target> <target name="jdk15-precompiled-tests" depends="compile"> @@ -1166,89 +1077,114 @@ </junit> </target> - <target name="jrockit-loadtime-tests" depends="compile-test-classes" if="JROCKIT_AVAILABLE"> - <property name="report.dir" value="${build.reports}/jroockit-loadtime-tests"/> - <mkdir dir="${report.dir}"/> + <!-- ==================================================================================== --> + <!-- JROCKIT TESTS (JDK 5.0) --> + <!-- ==================================================================================== --> + <target name="jrockit-tests" depends="compile-test-classes" if="JROCKIT_AVAILABLE"> - <junit printsummary="yes" fork="yes" haltonfailure="no" jvm="${jrockit.home}/bin/java"> - <sysproperty key="jboss.aop.path" value="${source.res}/test/basic/jboss-aop.xml"/> - <sysproperty key="verbose" value="true"/> - <jvmarg value="-Xmanagement:class=org.jboss.aop.hook.JRockitClassPreProcessor"/> - <classpath refid="test.jrockit.classpath"/> - <classpath path="${build.tests.classes}"/> - <formatter usefile="true" type="plain"/> - <formatter usefile="true" type="xml"/> - <test todir="${report.dir}" name="org.jboss.test.aop.basic.AOPTester" /> - </junit> - <junit printsummary="yes" fork="yes" haltonfailure="no" jvm="${jrockit.home}/bin/java"> - <jvmarg value="-Xmanagement:class=org.jboss.aop.hook.JRockitClassPreProcessor"/> - <sysproperty key="jboss.aop.path" value="${source.res}/test/reflection/jboss-aop.xml"/> - <classpath> - <path refid="test.jrockit.classpath"/> - <pathelement location="${build.tests.classes}"/> - </classpath> - <formatter type="plain"/> - <formatter usefile="true" type="xml"/> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.reflection.ReflectionTester"/> - </junit> - <junit printsummary="yes" fork="yes" haltonfailure="no" jvm="${jrockit.home}/bin/java"> - <jvmarg value="-Xmanagement:class=org.jboss.aop.hook.JRockitClassPreProcessor"/> - <sysproperty key="jboss.aop.path" value="${source.res}/test/dotinpointcutname/jboss-aop.xml"/> - <classpath> - <path refid="test.jrockit.classpath"/> - <pathelement location="${build.tests.classes}"/> - </classpath> - <formatter type="plain"/> - <formatter usefile="true" type="xml"/> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.dotinpointcutname.DotInPointcutNameTestCase"/> - </junit> - <junit printsummary="yes" fork="yes" haltonfailure="no" jvm="${jrockit.home}/bin/java"> - <jvmarg value="-Xmanagement:class=org.jboss.aop.hook.JRockitClassPreProcessor"/> - <sysproperty key="jboss.aop.path" value="${source.res}/test/introduction/introduction-aop.xml"/> - <formatter type="plain"/> - <formatter usefile="true" type="xml"/> - <classpath> - <path refid="test.jrockit.classpath"/> - <pathelement location="${build.tests.classes}"/> - </classpath> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.introduction.IntroductionTester"/> - </junit> - <junit printsummary="yes" fork="yes" haltonfailure="no" jvm="${jrockit.home}/bin/java"> - <jvmarg value="-Xmanagement:class=org.jboss.aop.hook.JRockitClassPreProcessor"/> - <sysproperty key="jboss.aop.path" value="${source.res}/test/precedence/jboss-aop.xml"/> - <classpath> - <path refid="test.jrockit.classpath"/> - <pathelement location="${build.tests.classes}"/> - <pathelement location="docs"/> - </classpath> - <formatter type="plain"/> - <formatter usefile="true" type="xml"/> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.precedence.PrecedenceTester"/> - </junit> + <!-- Add tests in _base-tests unless they should only be run in this weaving mode --> + <antcall target="_base-tests" inheritRefs="true"> + <param name="caller" value="jrockit-tests"/> + <param name="test-target" value="_run-jrockit-test"/> + </antcall> + + <!-- Tests only applicable for this weaving mode --> + <antcall target="_run-jrockit-test" inheritRefs="true"> + <param name="test" value="override"/> + <param name="caller" value="jrockit-tests"/> + <param name="exclude" value="**/GenAdvisorOverrideTestCase.class"/> + </antcall> + + </target> + + <!-- ==================================================================================== --> + <!-- GENERATED ADVISOR JROCKIT TESTS (JDK 5.0) --> + <!-- ==================================================================================== --> + <target name="jrockit-genadvisor-tests" depends="compile-test-classes" if="JROCKIT_AVAILABLE"> + + <!-- Add tests in _base-tests unless they should only be run in this weaving mode --> + <antcall target="_base-tests" inheritRefs="true"> + <param name="caller" value="jrockit-genadvisor-tests"/> + <param name="test-target" value="_run-jrockit-test"/> + </antcall> + + <!-- Tests only applicable for this weaving mode --> + <antcall target="_run-jrockit-test" inheritRefs="true"> + <param name="test" value="override"/> + <param name="caller" value="jrockit-genadvisor-tests"/> + <param name="exclude" value="**/OverrideTestCase.class"/> + </antcall> + </target> + + + <target name="_run-jrockit-test"> + + <!-- Check for jboss-aop.xml override --> + <condition property="jboss.aop.path" value="-Djboss.aop.path=${aop.xml}"> + <isset property="aop.xml"/> + </condition> + <condition property="jboss.aop.path" value=""> + <isset property="no.xml"/> + </condition> + <condition property="jboss.aop.path" value="-Djboss.aop.path=${source.res}/test/${test}/jboss-aop.xml"> + <not> + <isset property="aop.xml"/> + </not> + </condition> + + <!-- Get -Djboss.aop.class.path from passed in parameters --> + <condition property="jboss.aop.class.path" value="-Djboss.aop.class.path=${build.tests.classes}"> + <isset property="use.annotations"/> + </condition> + <condition property="jboss.aop.class.path" value=""> + <not> + <isset property="use.annotations"/> + </not> + </condition> + + <!-- Set the weaving mode and instrumentor to use--> + <condition property="instrumentor" value="org.jboss.aop.instrument.ClassicInstrumentor"> + <equals arg1="${caller}" arg2="jrockit-tests"/> + </condition> + <condition property="instrumentor" value="org.jboss.aop.instrument.GeneratedAdvisorInstrumentor"> + <equals arg1="${caller}" arg2="jrockit-genadvisor-tests"/> + </condition> + + <echo>Running ${test} with instrumentor ${instrumentor}</echo> + + <mkdir dir="${build.reports}"/> <junit printsummary="yes" fork="yes" haltonfailure="no" jvm="${jrockit.home}/bin/java"> <jvmarg value="-Xmanagement:class=org.jboss.aop.hook.JRockitClassPreProcessor"/> - <sysproperty key="jboss.aop.path" value="${source.res}/test/regression/jboss-aop.xml"/> - <formatter type="plain"/> - <formatter usefile="true" type="xml"/> + <jvmarg value="${jboss.aop.class.path}"/> + <jvmarg value="${jboss.aop.path}"/> + <sysproperty key="jboss.aop.instrumentor" value="${instrumentor}"/> + <sysproperty key="jboss.aop.debug.classes" value="true"/> + <formatter type="plain" extension="-${caller}.txt"/> + <classpath refid="test.classpath"/> + <formatter type="xml" extension="-${caller}.xml"/> <classpath> <path refid="test.jrockit.classpath"/> <pathelement location="${build.tests.classes}"/> </classpath> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.regression.jbaop206inheritadvised.AOPTester"/> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.regression.jbaop194_undeploy.UndeployTester"/> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.regression.jbaop197.OwnConstructorTestCase"/> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.regression.jbaop110.InnerClassTestCase"/> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.regression.annotatedIntroduction.AOPTester"/> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.regression.statictest.AOPTester"/> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.regression.inheritedmcall.AOPTester"/> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.regression.arraymethodparam.ArrayMethodParamTestCase"/> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.regression.inheritedfield.InheritedFieldTestCase"/> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.regression.ejbthree315.UnderscoreMethodTester"/> - <test todir="${report.dir}" fork="yes" name="org.jboss.test.aop.regression.jbaop137.ExtenderTestCase"/> + <batchtest todir="${build.reports}" + haltonerror="false" + haltonfailure="false" + fork="true"> + <fileset dir="${build.tests.classes}"> + <include name="org/jboss/test/aop/${test}/**/*TestCase.class"/> + <include name="org/jboss/test/aop/${test}/**/*Tester.class"/> + <exclude name="${exclude}"/> + + <!-- These are not test cases, and so they will fail when junit tries to run them. Should really rename all tests to *TestCase --> + <exclude name="org/jboss/test/aop/reflection/ReflectionAspectTester.class"/> + <exclude name="org/jboss/test/aop/basic/POJOAspectTester.class"/> + </fileset> + </batchtest> </junit> </target> + <target name="compiletime-declare" depends="compile-test-classes"> <taskdef name="aopc" classname="org.jboss.aop.ant.AopC" classpathref="jboss.aop.classpath"/> <taskdef name="annotationc" classname="org.jboss.aop.ant.AnnotationC" classpathref="jboss.aop.classpath"/> |