CVS: junit/build/experimental-use-of-antunit junit.ant, 1.2, 1.3 junit-remote.ant, 1.1, 1.2 junit-slow.ant, 1.2, 1.3 junit.properties, 1.1, 1.2 macros.ant, 1.1, 1.2
David Saff <[email protected]> Thu, 26 Apr 2007 13:21:23 -0700
| Newsgroups | gmane.comp.java.junit.devel |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/junit/junit/build/experimental-use-of-antunit
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12631/build/experimental-use-of-antunit
Modified Files:
junit.ant junit-remote.ant junit-slow.ant junit.properties
macros.ant
Log Message:
Merge build script with 4.3.1
Index: junit.ant
===================================================================
RCS file: /cvsroot/junit/junit/build/experimental-use-of-antunit/junit.ant,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- junit.ant 20 Mar 2007 14:12:23 -0000 1.2
+++ junit.ant 26 Apr 2007 20:21:21 -0000 1.3
@@ -1,6 +1,11 @@
<project xmlns:au="antlib:org.apache.ant.antunit">
- <import file="macros.ant"/>
+ <import file="macros.ant" />
+ <property name="binjarfile" value="${antdistdir}/${test.jarfile}" />
+ <property name="srcjarfile" value="${antdistdir}/${test.srcjarfile}" />
+
+ <!-- MACROS -->
+
<macrodef name="sizeOfDir">
<attribute name="property.name" />
<sequential>
@@ -26,6 +31,14 @@
</sequential>
</macrodef>
+ <macrodef name="unzip.exttestjavadoczip">
+ <sequential>
+ <unzip dest="${tempdir}" src="${exttestjavadoczip}" />
+ </sequential>
+ </macrodef>
+
+ <!-- TEST FIXTURE TESTS -->
+
<target name="testTearDown">
<mkdir dir="${antdistdir}" />
<mkdir dir="${tempdir}" />
@@ -38,23 +51,18 @@
<au:assertFileDoesntExist file="${exttestjavadoczip}" />
</target>
- <target name="testCharacterize_JavadocGeneratesJavadoc">
- <junitbuild target="javadoc" />
- <au:assertFileExists file="${antdistdir}/ant-unit-java-docs" />
- </target>
-
- <target name="testJavaDocZip">
- <junitbuild target="javadoczip" />
- <au:assertFileExists file="${exttestjavadoczip}" />
-
- <antcall target="unzip.exttestjavadoczip" />
- <au:assertFileExists file="${tempdir}/org" />
+ <target name="testCharacterize_DirSizeChanges">
+ <dirSizeChanges property.name="changed">
+ <mkdir dir="${tempdir}" />
+ <echo message="h" file="${tempdir}/whatever.txt" />
+ </dirSizeChanges>
+ <au:assertPropertySet name="changed" />
</target>
-
+
<target name="testUnzipOnlyCreatesDirectoryCleanedByTeardown">
<dirSizeChanges property.name="changed">
<junitbuild target="javadoczip" />
- <antcall target="unzip.exttestjavadoczip" />
+ <unzip.exttestjavadoczip />
<antcall target="tearDown" />
</dirSizeChanges>
<au:assertFalse>
@@ -62,16 +70,38 @@
</au:assertFalse>
</target>
- <target name="testCharacterize_DirSizeChanges">
- <dirSizeChanges property.name="changed">
- <mkdir dir="${tempdir}" />
- <echo message="h" file="${tempdir}/whatever.txt" />
- </dirSizeChanges>
- <au:assertPropertySet name="changed" />
+ <!-- CHARACTERIZATION TESTS DURING REFACTORING -->
+
+ <target name="testCharacterize_JavadocGeneratesJavadoc">
+ <junitbuild target="javadoc" />
+ <au:assertFileExists file="${antdistdir}/ant-unit-java-docs" />
</target>
- <target name="unzip.exttestjavadoczip">
- <unzip dest="${tempdir}" src="${exttestjavadoczip}" />
+ <target name="testCharacterize_PopulateGeneratesJUnitJar">
+ <junitbuild target="populate-dist" />
+ <au:assertFileExists file="${binjarfile}" />
+ </target>
+
+ <target name="testCharacterize_PopulateGeneratesSrcJar">
+ <junitbuild target="populate-dist" />
+ <au:assertFileExists file="${srcjarfile}" />
+ </target>
+
+ <target name="testCharacterize_PopulateCopiesSamplesAndTests">
+ <junitbuild target="samples-and-tests" />
+ <au:assertFileExists file="${antdistdir}/junit/samples" />
+ <au:assertFileExists file="${antdistdir}/junit/tests" />
+ <au:assertFileExists file="${antdistdir}/org/junit/samples" />
+ <au:assertFileExists file="${antdistdir}/org/junit/tests" />
+ </target>
+
+ <!-- DRIVING TESTS -->
+
+ <target name="testJavaDocZip">
+ <junitbuild target="javadoczip" />
+ <au:assertFileExists file="${exttestjavadoczip}" />
+ <unzip.exttestjavadoczip />
+ <au:assertFileExists file="${tempdir}/org" />
</target>
<target name="testJavaDocZipDeletedOnClean">
@@ -79,4 +109,14 @@
<junitbuild target="clean" />
<au:assertFileDoesntExist file="${exttestjavadoczip}" />
</target>
+
+ <!-- [Junit-trackers] [ junit-Bugs-1686931 ] JUnit 4.3 contains samples and tests in junit-4.3[-src].jar -->
+ <target name="testJarsDoesntIncludeSamplesInJUnitJar">
+ <junitbuild target="jars" />
+ <au:assertFalse>
+ <available classname="org.junit.tests.AllTests"
+ classpath="${binjarfile}"
+ />
+ </au:assertFalse>
+ </target>
</project>
\ No newline at end of file
Index: junit-remote.ant
===================================================================
RCS file: /cvsroot/junit/junit/build/experimental-use-of-antunit/junit-remote.ant,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- junit-remote.ant 20 Mar 2007 14:12:23 -0000 1.1
+++ junit-remote.ant 26 Apr 2007 20:21:21 -0000 1.2
@@ -1,14 +1,10 @@
<project xmlns:au="antlib:org.apache.ant.antunit">
- <import file="macros.ant"/>
-
+ <import file="macros.ant" />
+
<target name="testCharacterize_Upload">
- <!-- TODO: DUP -->
- <ant antfile="build.xml" target="clean" dir="${junitdir}">
- <property name="dist" value="${antdist}" />
- </ant>
- <!-- Should work -->
- <ant antfile="build.xml" target="upload.to.sourceforge" dir="${junitdir}">
- <property name="dist" value="${antdist}" />
- </ant>
+ <junitbuild target="clean" />
+
+ <!-- Should work without error -->
+ <junitbuild target="upload.to.sourceforge" />
</target>
</project>
\ No newline at end of file
Index: junit-slow.ant
===================================================================
RCS file: /cvsroot/junit/junit/build/experimental-use-of-antunit/junit-slow.ant,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- junit-slow.ant 20 Mar 2007 14:12:23 -0000 1.2
+++ junit-slow.ant 26 Apr 2007 20:21:21 -0000 1.3
@@ -1,12 +1,8 @@
<project xmlns:au="antlib:org.apache.ant.antunit">
<import file="macros.ant"/>
- <target name="testTearDown">
- <mkdir dir="${antdistdir}"/>
- <antcall target="tearDown" />
- <au:assertFileDoesntExist file="${antdistdir}" />
- </target>
-
+ <!-- CHARACTERIZATION TESTS -->
+
<target name="testCharacterize_DistGeneratesJavadoc">
<ant antfile="build.xml" target="dist" dir="${junitdir}">
<property name="dist" value="${antdist}" />
@@ -23,4 +19,28 @@
<au:assertLogContains text="Time:" />
</target>
+
+ <target name="testCharacterize_PopulateCopiesSamplesAndTests">
+ <junitbuild target="populate-dist" />
+ <au:assertFileExists file="${antdistdir}/junit/samples" />
+ <au:assertFileExists file="${antdistdir}/junit/tests" />
+ <au:assertFileExists file="${antdistdir}/org/junit/samples" />
+ <au:assertFileExists file="${antdistdir}/org/junit/tests" />
+ </target>
+
+ <!-- DRIVING TESTS -->
+
+ <target name="testPopulateDoesntRecursivelyInclude">
+ <junitbuild target="populate-dist" />
+ <au:assertFileDoesntExist file="${antdistdir}/${antdist}" />
+ </target>
+
+ <target name="testPopulateDoesntIncludeSamplesInJUnitJar">
+ <junitbuild target="populate-dist" />
+ <au:assertFalse>
+ <available classname="org.junit.tests.AllTests"
+ classpath="${binjarfile}"
+ />
+ </au:assertFalse>
+ </target>
</project>
\ No newline at end of file
Index: junit.properties
===================================================================
RCS file: /cvsroot/junit/junit/build/experimental-use-of-antunit/junit.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- junit.properties 10 Mar 2007 07:10:32 -0000 1.1
+++ junit.properties 26 Apr 2007 20:21:21 -0000 1.2
@@ -3,4 +3,6 @@
antdistdir=${junitdir}/${antdist}
testjavadoczip=new-england-javadoc.zip
exttestjavadoczip=${junitdir}/${testjavadoczip}
-tempdir=tempdir
\ No newline at end of file
+tempdir=tempdir
+test.jarfile=junit-test.version.jar
+test.srcjarfile=junit-test.version-src.jar
\ No newline at end of file
Index: macros.ant
===================================================================
RCS file: /cvsroot/junit/junit/build/experimental-use-of-antunit/macros.ant,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- macros.ant 20 Mar 2007 14:12:23 -0000 1.1
+++ macros.ant 26 Apr 2007 20:21:21 -0000 1.2
@@ -22,6 +22,8 @@
/>
<property name="javadoczip" value="${testjavadoczip}" />
<property name="javadocpackages" value="org.junit" />
+ <property name="binjar" value="${test.jarfile}" />
+ <property name="srcjar" value="${test.srcjarfile}" />
</ant>
</sequential>
</macrodef>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/