7160524 Upgrade JUnit4.5 to 4.10
authorSrinivasa Sarva <srinivasa.sarva@oracle.com>
Tue, 17 Apr 2012 10:17:05 -0700
changeset 772 96235751b5d2
parent 771 f57a88a76d61
child 773 cfddc5466118
7160524 Upgrade JUnit4.5 to 4.10
components/junit/Makefile
components/junit/junit.3
components/junit/junit.license
components/junit/junit.p5m
components/junit/patches/build.xml.patch
--- a/components/junit/Makefile	Tue Apr 17 09:10:45 2012 -0700
+++ b/components/junit/Makefile	Tue Apr 17 10:17:05 2012 -0700
@@ -18,17 +18,17 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 #
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		junit
-COMPONENT_VERSION=	4.5
+COMPONENT_VERSION=	4.10
 COMPONENT_PROJECT_URL=	http://sourceforge.net/projects/junit/
 COMPONENT_SRC=		$(COMPONENT_NAME)$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).zip
-COMPONENT_ARCHIVE_HASH=	sha1:75d642adaf15091c7ca9ed54f0f2f058bd9ec653
-COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)files/junit/4.5/$(COMPONENT_ARCHIVE)
+COMPONENT_ARCHIVE_HASH=	sha1:2613403253fccb245e2167acc276a16120b978d8
+COMPONENT_ARCHIVE_URL=  $(COMPONENT_PROJECT_URL)files/junit/4.10/$(COMPONENT_ARCHIVE)
 
 include ../../make-rules/prep.mk
 include ../../make-rules/ant.mk
--- a/components/junit/junit.3	Tue Apr 17 09:10:45 2012 -0700
+++ b/components/junit/junit.3	Tue Apr 17 10:17:05 2012 -0700
@@ -43,6 +43,11 @@
 JUnit framework jar file, bundled with the hamcrest-core-1.1 dependency.
 .LP
 
+/usr/share/doc/junit/doc/building-junit.txt
+.IP
+Steps to build JUnit
+.LP
+
 /usr/share/doc/junit/doc/cookbook/cookbook.htm
 .IP
 A cookbook for implementing tests with JUnit.
--- a/components/junit/junit.license	Tue Apr 17 09:10:45 2012 -0700
+++ b/components/junit/junit.license	Tue Apr 17 10:17:05 2012 -0700
@@ -1,3 +1,7 @@
+--------------
+- Junit 4.10 -
+--------------
+
 Common Public License - v 1.0
 
 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
@@ -211,4 +215,33 @@
 Agreement will bring a legal action under this Agreement more than one year
 after the cause of action arose. Each party waives its rights to a jury trial in
 any resulting litigation.
+--------------------------------------------------------------------------------
 
+				BSD License
+
+Copyright (c) 2000-2006, www.hamcrest.org
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of
+conditions and the following disclaimer. Redistributions in binary form must reproduce
+the above copyright notice, this list of conditions and the following disclaimer in
+the documentation and/or other materials provided with the distribution.
+
+Neither the name of Hamcrest nor the names of its contributors may be used to endorse
+or promote products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
--- a/components/junit/junit.p5m	Tue Apr 17 09:10:45 2012 -0700
+++ b/components/junit/junit.p5m	Tue Apr 17 10:17:05 2012 -0700
@@ -18,12 +18,13 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
 <transform file path=usr/share/doc/junit/(.+)$ -> set action.hash %<\1> >
-<transform file path=usr/share/doc/junit/samples/(.+)$ -> set action.hash %<\1> >
+<transform file path=usr/share/doc/junit/samples/org/junit/samples/(.+)$ -> \
+	set action.hash build/$(MACH32)/junit/samples/%<1> >
 <transform file path=usr/share/lib/java/(.+)$ -> set action.hash %<\1> >
 <transform file path=usr/share/lib/java/javadoc/junit/(.+)$ -> set action.hash %<\1> >
 set name=pkg.fmri \
@@ -35,18 +36,17 @@
     value=org.opensolaris.category.2008:Development/Java
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
-set name=org.opensolaris.arc-caseid \
-    value=LSARC/2008/633
+set name=org.opensolaris.arc-caseid value=LSARC/2008/633
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
 dir path=usr
 dir path=usr/share
 dir path=usr/share/doc
+dir path=usr/share/doc/cookbook
+dir path=usr/share/doc/cookstour
+dir path=usr/share/doc/faq
 dir path=usr/share/doc/junit
 dir path=usr/share/doc/junit/doc
-dir path=usr/share/doc/junit/doc/cookbook
-dir path=usr/share/doc/junit/doc/cookstour
-dir path=usr/share/doc/junit/doc/faq
-dir path=usr/share/doc/junit/doc/testinfected
+dir path=usr/share/doc/junit/org/testinfected
 dir path=usr/share/doc/junit/samples
 dir path=usr/share/doc/junit/samples/org
 dir path=usr/share/doc/junit/samples/org/junit
@@ -69,10 +69,25 @@
 dir path=usr/share/man
 dir path=usr/share/man/man3
 file path=usr/share/doc/junit/README.html
+file path=usr/share/doc/junit/doc/ReleaseNotes$(COMPONENT_VERSION).html
+file path=usr/share/doc/junit/doc/ReleaseNotes$(COMPONENT_VERSION).txt
 file path=usr/share/doc/junit/doc/ReleaseNotes4.4.html
 file path=usr/share/doc/junit/doc/ReleaseNotes4.4.txt
 file path=usr/share/doc/junit/doc/ReleaseNotes4.5.txt
+file path=usr/share/doc/junit/doc/ReleaseNotes4.6.html
 file path=usr/share/doc/junit/doc/ReleaseNotes4.6.txt
+file path=usr/share/doc/junit/doc/ReleaseNotes4.7.html
+file path=usr/share/doc/junit/doc/ReleaseNotes4.7.txt
+file path=usr/share/doc/junit/doc/ReleaseNotes4.8.1.html
+file path=usr/share/doc/junit/doc/ReleaseNotes4.8.1.txt
+file path=usr/share/doc/junit/doc/ReleaseNotes4.8.2.html
+file path=usr/share/doc/junit/doc/ReleaseNotes4.8.2.txt
+file path=usr/share/doc/junit/doc/ReleaseNotes4.8.html
+file path=usr/share/doc/junit/doc/ReleaseNotes4.8.txt
+file path=usr/share/doc/junit/doc/ReleaseNotes4.9.1.txt
+file path=usr/share/doc/junit/doc/ReleaseNotes4.9.html
+file path=usr/share/doc/junit/doc/ReleaseNotes4.9.txt
+file path=usr/share/doc/junit/doc/building-junit.txt
 file path=usr/share/doc/junit/doc/cookbook/cookbook.htm
 file path=usr/share/doc/junit/doc/cookbook/logo.gif
 file path=usr/share/doc/junit/doc/cookstour/Image1.gif
@@ -84,6 +99,7 @@
 file path=usr/share/doc/junit/doc/cookstour/Image7.gif
 file path=usr/share/doc/junit/doc/cookstour/cookstour.htm
 file path=usr/share/doc/junit/doc/faq/faq.htm
+file path=usr/share/doc/junit/doc/homepage.html
 file path=usr/share/doc/junit/doc/index.htm
 file path=usr/share/doc/junit/doc/markdown.sh
 file path=usr/share/doc/junit/doc/testinfected/IMG00001.GIF
@@ -91,14 +107,25 @@
 file path=usr/share/doc/junit/doc/testinfected/IMG00003.GIF
 file path=usr/share/doc/junit/doc/testinfected/logo.gif
 file path=usr/share/doc/junit/doc/testinfected/testing.htm
+file path=usr/share/doc/junit/samples/org/junit/samples/AllTests.class
+file path=usr/share/doc/junit/samples/org/junit/samples/AllTests.java
 file path=usr/share/doc/junit/samples/org/junit/samples/ListTest.class
 file path=usr/share/doc/junit/samples/org/junit/samples/ListTest.java
 file path=usr/share/doc/junit/samples/org/junit/samples/SimpleTest.class
 file path=usr/share/doc/junit/samples/org/junit/samples/SimpleTest.java
+file path=usr/share/doc/junit/samples/org/junit/samples/money/IMoney.class
+file path=usr/share/doc/junit/samples/org/junit/samples/money/IMoney.java
+file path=usr/share/doc/junit/samples/org/junit/samples/money/Money.class
+file path=usr/share/doc/junit/samples/org/junit/samples/money/Money.java
+file path=usr/share/doc/junit/samples/org/junit/samples/money/MoneyBag.class
+file path=usr/share/doc/junit/samples/org/junit/samples/money/MoneyBag.java
 file path=usr/share/doc/junit/samples/org/junit/samples/money/MoneyTest.class
 file path=usr/share/doc/junit/samples/org/junit/samples/money/MoneyTest.java
 file \
+    path=usr/share/doc/junit/samples/org/junit/samples/money/package-info.class
+file \
     path=usr/share/doc/junit/samples/org/junit/samples/money/package-info.java
+file path=usr/share/doc/junit/samples/org/junit/samples/package-info.class
 file path=usr/share/doc/junit/samples/org/junit/samples/package-info.java
 file path=usr/share/lib/java/javadoc/junit/allclasses-frame.html
 file path=usr/share/lib/java/javadoc/junit/allclasses-noframe.html
@@ -128,8 +155,10 @@
 file path=usr/share/lib/java/javadoc/junit/org/junit/Assume.html
 file path=usr/share/lib/java/javadoc/junit/org/junit/Before.html
 file path=usr/share/lib/java/javadoc/junit/org/junit/BeforeClass.html
+file path=usr/share/lib/java/javadoc/junit/org/junit/ClassRule.html
 file path=usr/share/lib/java/javadoc/junit/org/junit/ComparisonFailure.html
 file path=usr/share/lib/java/javadoc/junit/org/junit/Ignore.html
+file path=usr/share/lib/java/javadoc/junit/org/junit/Rule.html
 file path=usr/share/lib/java/javadoc/junit/org/junit/Test.None.html
 file path=usr/share/lib/java/javadoc/junit/org/junit/Test.html
 file \
@@ -143,6 +172,7 @@
 file path=usr/share/lib/java/javadoc/junit/org/junit/package-frame.html
 file path=usr/share/lib/java/javadoc/junit/org/junit/package-summary.html
 file path=usr/share/lib/java/javadoc/junit/org/junit/package-tree.html
+file path=usr/share/lib/java/javadoc/junit/org/junit/runner/Computer.html
 file path=usr/share/lib/java/javadoc/junit/org/junit/runner/Describable.html
 file path=usr/share/lib/java/javadoc/junit/org/junit/runner/Description.html
 file path=usr/share/lib/java/javadoc/junit/org/junit/runner/JUnitCore.html
@@ -208,8 +238,8 @@
 file path=usr/share/lib/java/javadoc/junit/resources/inherit.gif
 file path=usr/share/lib/java/javadoc/junit/serialized-form.html
 file path=usr/share/lib/java/javadoc/junit/stylesheet.css
-file path=usr/share/lib/java/junit-4.5.jar
+file path=usr/share/lib/java/junit-$(COMPONENT_VERSION).jar
 file junit.3 path=usr/share/man/man3/junit.3
-license junit.license license=CPLv1.0
+license junit.license license="CPLv1.0, BSD"
 link path=usr/share/doc/junit/javadoc target=../../lib/java/javadoc/junit
-link path=usr/share/lib/java/junit.jar target=junit-4.5.jar
+link path=usr/share/lib/java/junit.jar target=junit-$(COMPONENT_VERSION).jar
--- a/components/junit/patches/build.xml.patch	Tue Apr 17 09:10:45 2012 -0700
+++ b/components/junit/patches/build.xml.patch	Tue Apr 17 10:17:05 2012 -0700
@@ -1,98 +1,144 @@
---- junit4.5/build.xml	Tue Aug 19 15:12:22 2008
-+++ junit4.5/build.xml.new	Mon Sep  1 10:39:18 2008
-@@ -2,14 +2,14 @@
- 	<tstamp />
+--- junit4.10/build.xml.~1~	2011-09-29 14:20:56.000000000 -0700
++++ junit4.10/build.xml	2012-04-10 16:50:13.369334597 -0700
+@@ -1,19 +1,19 @@
+ <project name="junit" default="dist" basedir="."
+          xmlns:artifact="antlib:org.apache.maven.artifact.ant">
+   <tstamp />
+-  <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
++ 
  
- 	<property file="${user.home}/.junit.properties" />
--	<property name="src" value="src/main/java" />
-+	<property name="src" value="src/main" />
- 	<property name="target" location="target" />
- 	<property name="bin" location="${target}/main" />
- 	<property name="version" value="4.5" />
--	<property name="dist" value="junit${version}" />
-+	<property name="dist" value="dist" />
- 	<property name="versionfile" value="${src}/junit/runner/Version.java" />
- 	<property name="zipfile"  value="${dist}/${dist}.zip" />
--	<property name="testsrc" location="src/test/java" />
-+	<property name="testsrc" location="src/test" />
- 	<property name="testbin" location="${target}/test/java" />
- 	<property name="unjarred" value="**/*.jar, ${testfiles}, doc/**, README.html, .classpath, .project, cpl-v10.html" />
- 	<property name="binjar" value="junit-${version}.jar" />
-@@ -18,11 +18,18 @@
- 	<property name="javadocdir" location="${dist}/javadoc" />
- 	<property name="javadoczip" location="${dist}-javadoc.zip" />
- 	<property name="javadocpackages" value="org.junit, org.junit.runner, org.junit.runner.description, org.junit.runner.manipulation, org.junit.runner.notification, org.junit.runners, org.hamcrest.core, org.junit.matchers" />
--	<property name="hamcrestlib" location="lib/hamcrest-core-1.1.jar" />
--	<property name="hamcrestsrc" location="${dist}/temp.hamcrest.source" />
-+	<property name="hamcrestsrc" location="temp.hamcrest.source" />
- 	
- 	<target name="init">
- 		<tstamp/>
-+		<unjar src="${srcjar}" dest="${src}" />
-+		<copy todir="${testsrc}/org">
-+			<fileset dir="org" />
-+		</copy>
-+		<copy todir="${testsrc}/junit">
-+			<fileset dir="junit" />
-+		</copy>
-+
- 	</target>
+   <property file="${user.home}/.junit.properties" />
+-  <property name="src" value="src/main/java" />
++  <property name="src" value="src/main/" />
+   <property name="target" location="target" />
+   <property name="bin" location="${target}/main" />
+   <property name="version-base" value="4.10" />
+   <property name="version-status" value="" />
+   <property name="version" value="${version-base}${version-status}" />
+-  <property name="dist" value="junit${version}" />
++  <property name="dist" value="dist" />
+   <property name="versionfile" value="${src}/junit/runner/Version.java" />
+   <property name="zipfile"  value="${dist}/${dist}.zip" />
+-  <property name="testsrc" location="src/test/java" />
++  <property name="testsrc" location="src/test" />
+   <property name="testbin" location="${target}/test/java" />
+   <property name="unjarred" 
+             value="**/*.jar, ${testfiles}, doc/**, README.html, .classpath, .project, cpl-v10.html" />
+@@ -28,11 +28,18 @@
  
- 	<target name="versiontag" depends="init">
-@@ -39,6 +46,8 @@
- 		<!-- If two builds are made within a minute -->
- 		<delete dir="${dist}" quiet="true" />
- 		<!-- Delete all previous temporary build artifacts -->
+   <property name="javadocdir" location="${dist}/javadoc" />
+   <property name="javadoczip" location="${dist}-javadoc.zip" />
+-  <property name="hamcrestlib" location="lib/hamcrest-core-1.1.jar" />
+-  <property name="hamcrestsrc" location="${dist}/temp.hamcrest.source" />
++  <property name="javadocpackages" value="org.junit, org.junit.runner, org.junit.runner.description, org.junit.runner.manipulation, org.junit.runner.notification, org.junit.runners, org.hamcrest.core, org.junit.matchers" />
++  <property name="hamcrestsrc" location="temp.hamcrest.source" />
+ 
+   <target name="init">
+     <tstamp/>
++	<unjar src="${srcjar}" dest="${src}" />
++	<copy todir="${testsrc}/org">
++		<fileset dir="org" />
++	</copy>
++	<copy todir="${testsrc}/junit">
++		<fileset dir="junit" />
++	</copy>
+   </target>
+ 
+   <target name="versiontag" depends="init">
+@@ -50,6 +57,8 @@
+     <!-- If two builds are made within a minute -->
+     <delete dir="${dist}" quiet="true" />
+     <!-- Delete all previous temporary build artifacts -->
 +		<delete dir="${src}" quiet="true" />
 +		<delete dir="${testsrc}" quiet="true" />
- 		<delete dir="${target}" quiet="true" />
- 		
- 		<delete file="${zipfile}" quiet="true"/>
-@@ -71,9 +80,9 @@
- 	</macrodef>
- 	
- 	<target name="build" depends="versiontag">
--		<junit_compilation srcdir="${src}" destdir="${bin}" classpath="${hamcrestlib}"/>
--		<unjar src="${hamcrestlib}" dest="${bin}" />
--		<junit_compilation srcdir="${testsrc}" destdir="${testbin}" classpath="${hamcrestlib};${bin}"/>
+     <delete dir="${target}" quiet="true" />
+     
+     <delete file="${zipfile}" quiet="true"/>
+@@ -76,12 +85,12 @@
+   </macrodef>
+   
+   <target name="build" depends="versiontag">
+-    <junit_compilation srcdir="${src}" destdir="${bin}" classpath="${hamcrestlib}"/>
+-    <unjar src="${hamcrestlib}" dest="${bin}" />
+-    <junit_compilation srcdir="${testsrc}" destdir="${testbin}" classpath="${hamcrestlib};${bin}"/>
 +		<junit_compilation srcdir="${hamcrestsrc}" destdir="${bin}" classpath=""/>
 +		<junit_compilation srcdir="${src}" destdir="${bin}" classpath="${bin}"/>
 +		<junit_compilation srcdir="${testsrc}" destdir="${testbin}" classpath="${bin}"/>
- 	</target>
+   </target>
  
- 	<target name="jars">
-@@ -97,16 +106,12 @@
+-  <target name="jars" depends="build">
++  <target name="jars">
+     <mkdir dir="${dist}" />
+     <jar 
+         jarfile="${dist}/${srcjar}"
+@@ -121,40 +130,33 @@
+ 
+   <target name="samples-and-tests">
+     <copy todir="${dist}">
+-      <fileset dir="${testbin}" />
+-      <fileset dir="${testsrc}" />
++   	    <fileset dir="${testsrc}" />
+     </copy>
+   </target>
  
- 	<target name="samples-and-tests">
- 		<copy todir="${dist}">
--			<fileset dir="${testbin}" />
- 			<fileset dir="${testsrc}" />
- 		</copy>
- 	</target>
- 
--	<target name="unjar.hamcrest">
--		<unjar src="${hamcrestlib}" dest="${hamcrestsrc}" />
--	</target>
- 	
--	<target name="javadoc" depends="unjar.hamcrest">
+-  <target name="unjar.hamcrest">
+-    <unjar src="${hamcrestlib}" dest="${hamcrestsrc}" />
+-  </target>
+-  
++
+   <target name="release-notes">
+     <property name="basename" value="doc/ReleaseNotes${version-base}" />
+-    <exec executable="build/Markdown.pl" failonerror="true">
++          <exec executable="perl" failonerror="true">
++	    <arg file="../../Markdown.pl"/>
+       <arg file="${basename}.txt"/>
+       <redirector output="${basename}.html" />
+     </exec>
+   </target>
+   
+-  <target name="javadoc" depends="unjar.hamcrest">
+-    <javadoc destdir="${javadocdir}"
 +	<target name="javadoc" >
- 		<javadoc packagenames="${javadocpackages}"
- 		         destdir="${javadocdir}"
- 		         author="false"
-@@ -113,7 +118,7 @@
- 		         version="false"
- 		         use="false"
- 		         windowtitle="JUnit API"
--		         stylesheetfile="stylesheet.css"
-+		         stylesheetfile="javadoc/stylesheet.css"
- 		>
- 			<sourcepath location="${src}" />
- 			<sourcepath location="${hamcrestsrc}" />
-@@ -134,7 +139,6 @@
- 		</copy>
- 		<copy file="README.html" tofile="${dist}/README.html" />
- 		<copy file="cpl-v10.html" tofile="${dist}/cpl-v10.html" />
--		<copy file="build.xml" tofile="${dist}/build.xml" />
- 	</target>
++ 		<javadoc packagenames="${javadocpackages}"
++    	     destdir="${javadocdir}"
+              author="false"
+              version="false"
+              use="false"
+              windowtitle="JUnit API"
+-             stylesheetfile="stylesheet.css"
+-             >
+-      <excludepackage name="junit.*" />
+-      <excludepackage name="org.junit.internal.*" />
+-      <excludepackage name="org.junit.experimental.theories.internal.*" />
+-      
+-      <sourcepath location="${src}" />
+-      <sourcepath location="${hamcrestsrc}" />
+-      <link href="http://java.sun.com/javase/6/docs/api/" />
+-    </javadoc>
+-  </target>
++             stylesheetfile="javadoc/stylesheet.css"
++	>
++			<sourcepath location="${src}" />
++			<sourcepath location="${hamcrestsrc}" />
++		</javadoc>
++	</target>
  
- 	<target name="dist" depends="populate-dist">
+   <target name="javadoczip">
+     <delete file="${javadoczip}" />
+@@ -163,7 +165,7 @@
+   </target>
+ 
+   <target name="populate-dist" 
+-          depends="clean, build, jars, samples-and-tests, javadoc, release-notes"
++          depends="clean, build, jars, samples-and-tests, javadoc"
+           >
+     <copy todir="${dist}/doc">
+       <fileset dir="doc"/>
+@@ -171,7 +173,6 @@
+     <copy file="README.html" tofile="${dist}/README.html" />
+     <copy file="BUILDING" tofile="${dist}/BUILDING" />
+     <copy file="cpl-v10.html" tofile="${dist}/cpl-v10.html" />
+-    <copy file="build.xml" tofile="${dist}/build.xml" />
+   </target>
+ 
+   <macrodef name="run-tests">