Update to JUnit-4.11

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@11448 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
Bruce Dubbs 2013-07-17 19:45:57 +00:00
parent 32d4980cac
commit 94c4ae34fa
2 changed files with 47 additions and 46 deletions

View File

@ -6,10 +6,10 @@
<!ENTITY junit-download-http "https://launchpad.net/debian/+archive/primary/+files/junit4_4.11.orig.tar.gz">
<!ENTITY junit-download-ftp " ">
<!ENTITY junit-md5sum " ">
<!ENTITY junit-md5sum "b4d163832583dcec8bedb5427c795cc4">
<!ENTITY junit-size "1.7 MB">
<!ENTITY junit-buildsize "15 MB">
<!ENTITY junit-time "less than 0.1 SBU">
<!ENTITY junit-buildsize "34 MB">
<!ENTITY junit-time "0.1 SBU">
]>
<sect1 id="junit" xreflabel="JUnit-&junit-version;">
@ -29,16 +29,13 @@
<sect2 role="package">
<title>Introduction to JUnit</title>
<warning><para>Under revison do not use for now.</para></warning>
<para>The <application>JUnit</application> package contains a simple, open
source framework to write and run repeatable tests. It is an instance of
the xUnit architecture for unit testing frameworks. JUnit features include
assertions for testing expected results, test fixtures for sharing common
test data, and test runners for running tests.</para>
<!-- &lfs73_checked; -->
&lfs73_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
@ -62,20 +59,20 @@
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Required Additional Downloads</bridgehead>
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
<ulink url="http://anduin.linuxfromscratch.org/sources/other/junit-4.11.jar">junit-4.11.jar
(http//anduin.linuxfromscratch.org/sources/other/junit-4.11.jar)
</ulink>
Required file: <ulink
url="http://anduin.linuxfromscratch.org/sources/other/junit-4.11.jar">
http//anduin.linuxfromscratch.org/sources/other/junit-4.11.jar</ulink>
</para>
</listitem>
<listitem>
<para>
<ulink url="http://hamcrest.googlecode.com/files/hamcrest-1.3.tgz">hamcrest-1.3.tgz
(http//hamcrest.googlecode.com/files/hamcrest-1.3.tgz)
</ulink>
Required file: <ulink
url="http://hamcrest.googlecode.com/files/hamcrest-1.3.tgz">
http://hamcrest.googlecode.com/files/hamcrest-1.3.tgz </ulink>
</para>
</listitem>
</itemizedlist>
@ -84,6 +81,7 @@
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="apache-ant"/> and
<xref linkend="unzip"/>
</para>
@ -96,55 +94,55 @@
<title>Installation of JUnit</title>
<para>To do a full build of JUnit from source, <xref linkend='apache-ant'/>
is required. However JUnit is a circular depedency of Apache Ant. Copy
the JUnit jar file to get started. Then come back to build from source, if
desired.</para>
is required. However JUnit is useful in building Apache Ant. Copy the
JUnit-&junit-version; jar file to get started. Then come back to build
from source, if desired.</para>
<para>Install the <application>JUnit</application> jar file by running the following
commands as the <systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>install -v -m755 -d /usr/share/java &amp;&amp;
cp -v junit.jar /usr/share/java</userinput></screen>
cp -v junit&junit-version;.jar /usr/share/java</userinput></screen>
<para>Now install the required hamcrest jar files. Extract the hamcrest-1.3.tgz
files change to the extracted directory. Then, as the
<para>At this point, make sure Apache-Ant is installed and then continue
with the source build and instalation. From the directory created when
extracting the JUnit sources, place the required hamcrest jar files where
needed and build the package:</para>
<screen role="root"><userinput>tar -xf ../hamcrest-1.3.tgz &amp;&amp;
cp -v hamcrest-1.3/hamcrest-core-1.3{,-sources}.jar lib/ &amp;&amp;
ant dist</userinput></screen>
<para>Testing is automatically done as a part of the build step.</para>
<para>Install the files in the final location as the
<systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>install -v -m755 -d /usr/share/{doc,java}/junit-&junit-version; &amp;&amp;
chown -R root:root . &amp;&amp;
<screen role="root"><userinput>install -v -m755 -d /usr/share/java/hamcrest &amp;&amp;
cp -v hamcrest-all-1.3.jar /usr/share/java/hamcrest &amp;&amp;
ln -sv hamcrest/hamcrest-all-1.3.jar /usr/share/java/hamcrest.jar </userinput></screen>
cp -v -R junit*/javadoc/* /usr/share/doc/junit-&junit-version; &amp;&amp;
cp -v junit*/junit*.jar /usr/share/java/junit-&junit-version; &amp;&amp;
cp -v hamcrest-1.3/hamcrest-core*.jar /usr/share/java/junit-&junit-version;</userinput></screen>
<para>Finally, update the <envar>CLASSPATH</envar> variable:</para>
<para>Add the <filename
class='libraryfile'>junit-&junit-version;.jar</filename> and <filename
class='directory'>/usr/share/junit-&junit-version;</filename> directory to
your system <envar>CLASSPATH</envar> environment variable:</para>
<screen><userinput>export CLASSPATH=$CLASSPATH:\
/usr/share/java/junit-&junit-version;.jar:/usr/share/java/hamcrest.jar</userinput></screen>
<!--
<para>To run the <application>JUnit</application> regression self-tests,
you'll need to have <xref linkend="openjdk"/>,<!- - <xref linkend="jdk"/>,- -> or
<ulink url="http://jikes.sourceforge.net/">Jikes</ulink> installed and the
<envar>CLASSPATH</envar> environment variable updated. Then, as an
unprivileged user, issue:</para>
<screen><userinput>java org.junit.runner.JUnitCore org.junit.tests.AllTests</userinput></screen>
-->
<screen><userinput>export CLASSPATH=$CLASSPATH:/usr/share/java/junit-&junit-version;</userinput></screen>
</sect2>
<!--
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Library</segtitle>
<segtitle>Installed Libraies</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>None</seg>
<seg>junit-&junit-version;.jar</seg>
<seg>/usr/share/junit-&junit-version;,
/usr/share/doc/junit-&junit-version;</seg>
<seg>hamcrest-core and junit jar files</seg>
<seg>/usr/share/doc/junit-&junit-version; and
/usr/share/java/junit-&junit-version;</seg>
</seglistitem>
</segmentedlist>
@ -154,7 +152,7 @@ ln -sv hamcrest/hamcrest-all-1.3.jar /usr/share/java/hamcrest.jar </userinput><
<?dbhtml list-presentation="table"?>
<varlistentry id="junit.jar">
<term><filename class='libraryfile'>junit-&junit-version;.jar</filename></term>
<term><filename class='libraryfile'>junit jar files</filename></term>
<listitem>
<para>contains java classes to support the xUnit framework testing
architecture.</para>
@ -167,5 +165,5 @@ ln -sv hamcrest/hamcrest-all-1.3.jar /usr/share/java/hamcrest.jar </userinput><
</variablelist>
</sect2>
-->
</sect1>

View File

@ -46,6 +46,9 @@
<listitem>
<para>July 17th, 2013</para>
<itemizedlist>
<listitem>
<para>[igor] - Update to JUnit-4.11.</para>
</listitem>
<listitem>
<para>[igor] - Downgraded Lua to 5.1.5</para>
</listitem>