aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-05-08 08:03:30 +0000
committerwisberg <wisberg>2003-05-08 08:03:30 +0000
commit02ead59b1d554f83abeba979c036f6d5aafb896e (patch)
tree479d50eed85d101df28fecba26465f91d9129d27 /tests
parent7f4f76fbb0730f6cab95c2f3b726dedb95ea9fdb (diff)
downloadaspectj-02ead59b1d554f83abeba979c036f6d5aafb896e.tar.gz
aspectj-02ead59b1d554f83abeba979c036f6d5aafb896e.zip
incomplete update to support module jars rather than eclipse bin directories when running junit tests
the old way with bin directories still works fine.
Diffstat (limited to 'tests')
-rw-r--r--tests/junitModules.xml140
1 files changed, 102 insertions, 38 deletions
diff --git a/tests/junitModules.xml b/tests/junitModules.xml
index db897ebf9..81164087c 100644
--- a/tests/junitModules.xml
+++ b/tests/junitModules.xml
@@ -6,23 +6,109 @@
<project name="junitModules" default="test-all" basedir=".">
<property name="project.name" value="junitModules"/>
+ <target name="info">
+ <echo >
+ Variables to consider defining:
+
+ aspectjrt.path path to release version of runtime
+
+ test.classpath use jar.classpath or bin.classpath
+ (default is bin if available)
+ Using jar.classpath requires building all modules
+ *with* testing code, as follows:
+ cd build
+ ant clean
+ ant -Dtrim.testing.default=false build-testing-drivers
+ ant -Dtrim.testing.default=false aspectjrt
+ ant -Dtrim.testing.default=false any-module -Dmodule.name=ajbrowser
+
+ </echo>
+ </target>
<target name="init">
- <property name="haltOnTestFailure" value="false"/>
- <property name="modules.dir"
- location="${basedir}/.."/>
- <property name="tests.module.dir"
- location="${modules.dir}/tests"/>
- <property name="aspectj.modules.lib.dir"
- location="${modules.dir}/lib"/>
- <property name="junitModules.output.dir"
- location="${tests.module.dir}/bin/junitXmlOutput" />
- <mkdir dir="${junitModules.output.dir}"/>
- </target>
+ <property name="haltOnTestFailure" value="false"/>
+ <property name="modules.dir"
+ location="${basedir}/.."/>
+ <property name="jar.dir"
+ location="${modules.dir}/aj-build/jars"/>
+ <property name="tests.module.dir"
+ location="${modules.dir}/tests"/>
+ <property name="aspectj.modules.lib.dir"
+ location="${modules.dir}/lib"/>
+ <property name="junitModules.output.dir"
+ location="${tests.module.dir}/bin/junitXmlOutput" />
+ <property name="aspectjrt.path"
+ location="${aspectj.modules.lib.dir}/test/aspectjrt.jar"/>
+
+ <mkdir dir="${junitModules.output.dir}"/>
+ <path id="lib.classpath">
+ <pathelement location="${aspectj.modules.lib.dir}/eclipse2.0/jdtDepends.jar" />
+ <pathelement location="${aspectj.modules.lib.dir}/bcel/bcel.jar" />
+ <pathelement location="${aspectj.modules.lib.dir}/jdiff/jdiff.jar" />
+ <pathelement location="${aspectj.modules.lib.dir}/commons/commons.jar" />
+ <pathelement location="${aspectj.modules.lib.dir}/ant/lib/ant.jar" />
+ <pathelement location="${aspectj.modules.lib.dir}/ant/lib/xml-apis.jar" />
+ <pathelement location="${aspectj.modules.lib.dir}/ant/lib/xercesImpl.jar" />
+ <pathelement location="${aspectj.modules.lib.dir}/test/ .jar" />
+ <pathelement location="${modules.dir}/org.eclipse.jdt.core/jdtcore-for-aspectj.jar" />
+ </path>
+
+ <path id="bin.classpath">
+ <pathelement location="${modules.dir}/ajde/bin" />
+ <pathelement location="${modules.dir}/ajbrowser/bin" />
+ <pathelement location="${modules.dir}/asm/bin" />
+ <pathelement location="${modules.dir}/bridge/bin" />
+ <pathelement location="${modules.dir}/build/bin" />
+ <pathelement location="${modules.dir}/org.aspectj.ajdt.core/bin" />
+ <pathelement location="${modules.dir}/runtime/bin" />
+ <pathelement location="${modules.dir}/taskdefs/bin" />
+ <pathelement location="${modules.dir}/testing/bin" />
+ <pathelement location="${modules.dir}/testing-client/bin" />
+ <pathelement location="${modules.dir}/testing-drivers/bin" />
+ <pathelement location="${modules.dir}/testing-util/bin" />
+ <pathelement location="${modules.dir}/util/bin" />
+ <pathelement location="${modules.dir}/weaver/bin" />
+ <path refid="lib.classpath"/>
+ </path>
+ <!-- requires normal build, i.e., with test classes -->
+ <path id="jar.classpath">
+ <pathelement location="${jar.dir}/ajde.jar" />
+ <pathelement location="${jar.dir}/ajbrowser.jar" />
+ <pathelement location="${jar.dir}/asm.jar" />
+ <pathelement location="${jar.dir}/bridge.jar" />
+ <pathelement location="${jar.dir}/build.jar" />
+ <pathelement location="${jar.dir}/org.aspectj.ajdt.core.jar" />
+ <pathelement location="${jar.dir}/runtime.jar" />
+ <pathelement location="${jar.dir}/taskdefs.jar" />
+ <pathelement location="${jar.dir}/testing.jar" />
+ <pathelement location="${jar.dir}/testing-client.jar" />
+ <pathelement location="${jar.dir}/testing-drivers.jar" />
+ <pathelement location="${jar.dir}/testing-util.jar" />
+ <pathelement location="${jar.dir}/util.jar" />
+ <pathelement location="${jar.dir}/weaver.jar" />
+ <path refid="lib.classpath"/>
+ </path>
+ <available property="bin.path.available"
+ file="${modules.dir}/weaver/bin"/>
+ <available property="jar.path.available"
+ file="${jar.dir}/asm.jar"/>
+ </target>
+
+ <target name="select-path"
+ depends="select-jar,select-bin"
+ unless="test.classpath"/>
+ <target name="select-bin" depends="init"
+ if="bin.path.available">
+ <property name="test.classpath" value="bin.classpath"/>
+ </target>
+ <target name="select-jar" depends="init"
+ if="jar.path.available" unless="bin.path.available">
+ <property name="test.classpath" value="jar.classpath"/>
+ </target>
+
<target name="clean" depends="init">
<delete dir="${junitModules.output.dir}"/>
</target>
-
<target name="jdepend" depends="init"
description="run jdepend">
@@ -51,7 +137,7 @@
<echo message="View results in file:${fileUrl}"/>
</target>
- <target name="test-all" depends="init"
+ <target name="test-all" depends="init,select-path"
description="run all module tests (except IDE integrations)">
<!-- not running bridgeImpl, compiler, netbeans, jbuilder tests -->
@@ -140,31 +226,9 @@
<echo message="Starting ${moduleName} tests..."/>
<junit fork="on" includeAntRuntime="on" dir="${modules.dir}/${moduleName}"
printsummary="yes" haltonfailure="${haltOnTestFailure}" >
- <classpath>
- <pathelement location="${modules.dir}/ajde/bin" />
- <pathelement location="${modules.dir}/ajbrowser/bin" />
- <pathelement location="${modules.dir}/asm/bin" />
- <pathelement location="${modules.dir}/bridge/bin" />
- <pathelement location="${modules.dir}/build/bin" />
- <pathelement location="${modules.dir}/org.aspectj.ajdt.core/bin" />
- <pathelement location="${modules.dir}/org.eclipse.jdt.core/jdtcore-for-aspectj.jar" />
- <pathelement location="${modules.dir}/runtime/bin" />
- <pathelement location="${modules.dir}/taskdefs/bin" />
- <pathelement location="${modules.dir}/testing/bin" />
- <pathelement location="${modules.dir}/testing-client/bin" />
- <pathelement location="${modules.dir}/testing-drivers/bin" />
- <pathelement location="${modules.dir}/testing-util/bin" />
- <pathelement location="${modules.dir}/util/bin" />
- <pathelement location="${modules.dir}/weaver/bin" />
- <pathelement location="${aspectj.modules.lib.dir}/eclipse2.0/jdtDepends.jar" />
- <pathelement location="${aspectj.modules.lib.dir}/bcel/bcel.jar" />
- <pathelement location="${aspectj.modules.lib.dir}/jdiff/jdiff.jar" />
- <pathelement location="${aspectj.modules.lib.dir}/commons/commons.jar" />
- <pathelement location="${aspectj.modules.lib.dir}/ant/lib/ant.jar" />
- <pathelement location="${aspectj.modules.lib.dir}/ant/lib/xml-apis.jar" />
- <pathelement location="${aspectj.modules.lib.dir}/ant/lib/xercesImpl.jar" />
- <pathelement location="${aspectj.modules.lib.dir}/test/aspectjrt.jar" />
- </classpath>
+ <classpath>
+ <path refid="${test.classpath}"/>
+ </classpath>
<!-- AMC added this next line, needed when testing release builds,
(those whose version is something other than DEVELOPMENT). The NullIdeAdapter