glfs/general/prog/junit.xml
Bruce Dubbs e570555125 Finish tagging multimedia, postlfs, and pst sections
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@18381 af4574ff-66df-0310-9fd7-8a98e5e911e0
2017-02-21 22:52:57 +00:00

176 lines
5.8 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY junit-download-http "https://launchpad.net/debian/+archive/primary/+files/junit4_&junit-version;.orig.tar.gz">
<!ENTITY junit-download-ftp " ">
<!ENTITY junit-md5sum "b4d163832583dcec8bedb5427c795cc4">
<!ENTITY junit-size "1.7 MB">
<!ENTITY junit-buildsize "34 MB">
<!ENTITY junit-time "0.1 SBU">
]>
<sect1 id="junit" xreflabel="JUnit-&junit-version;">
<?dbhtml filename="junit.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>JUnit-&junit-version;</title>
<indexterm zone="junit">
<primary sortas="a-JUnit">JUnit</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to JUnit</title>
<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>
&lfs80_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Download (HTTP): <ulink url="&junit-download-http;"/></para>
</listitem>
<listitem>
<para>Download (FTP): <ulink url="&junit-download-ftp;"/></para>
</listitem>
<listitem>
<para>Download MD5 sum: &junit-md5sum;</para>
</listitem>
<listitem>
<para>Download size: &junit-size;</para>
</listitem>
<listitem>
<para>Estimated disk space required: &junit-buildsize;</para>
</listitem>
<listitem>
<para>Estimated build time: &junit-time;</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Required file: <ulink
url="http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/&hamcrest-version;/hamcrest-core-&hamcrest-version;.jar"/>
</para>
</listitem>
<listitem>
<para>
Required file: <ulink
url="http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/&hamcrest-version;/hamcrest-core-&hamcrest-version;-sources.jar"/>
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">JUnit Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="apache-ant"/> and
<xref linkend="unzip"/>
</para>
<para condition="html" role="usernotes">User Notes:
<ulink url="&blfs-wiki;/junit"/></para>
</sect2>
<sect2 role="installation">
<title>Installation of JUnit</title>
<para>
The <command>javadoc</command> command coming with OpenJDK 8 has become
much stricter than before regarding the conformance of the Javadoc
comments in source code to HTML. The <application>Junit</application>
documentation does not meet that standard, so the conformance checks
have to be disabled. This can be done with the following command:
</para>
<screen><userinput>sed -i '\@/docs/@a&lt;arg value="-Xdoclint:none"/&gt;' build.xml</userinput></screen>
<para>
Now place the required hamcrest jar files where needed and build the
package:
</para>
<screen><userinput>cp -v ../hamcrest-core-&hamcrest-version;{,-sources}.jar lib/ &amp;&amp;
ant populate-dist</userinput></screen>
<para>
Test the package by issuing <command>ant dist</command>. One test fails
for unknown reason.
</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;
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-&hamcrest-version;/hamcrest-core*.jar /usr/share/java/junit-&junit-version;</userinput></screen>
<para>
If you have followed the instructions in <xref linkend="ojdk-conf"/>,
there is nothing more to do: the <envar>CLASSPATH</envar> variable
would be automatically updated.
</para>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>None</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>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="junit.jar">
<term><filename class='libraryfile'>junit jar files</filename></term>
<listitem>
<para>contains java classes to support the xUnit framework testing
architecture.</para>
<indexterm zone="junit junit.jar">
<primary sortas="c-junit.jar">junit-&junit-version;.jar</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>