mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-27 18:02:12 +08:00
e6a3602dc3
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@11813 af4574ff-66df-0310-9fd7-8a98e5e911e0
170 lines
6.0 KiB
XML
170 lines
6.0 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_4.11.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>
|
|
|
|
&lfs74_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://anduin.linuxfromscratch.org/sources/other/junit-4.11.jar">
|
|
http://anduin.linuxfromscratch.org/sources/other/junit-4.11.jar</ulink>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
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>
|
|
|
|
<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>To do a full build of JUnit from source, <xref linkend='apache-ant'/>
|
|
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 &&
|
|
cp -v junit-&junit-version;.jar /usr/share/java</userinput></screen>
|
|
|
|
<para>At this point, make sure Apache-Ant is installed and then continue
|
|
with the source build and installation. 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 &&
|
|
cp -v hamcrest-1.3/hamcrest-core-1.3{,-sources}.jar lib/ &&
|
|
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; &&
|
|
chown -R root:root . &&
|
|
|
|
cp -v -R junit*/javadoc/* /usr/share/doc/junit-&junit-version; &&
|
|
cp -v junit*/junit*.jar /usr/share/java/junit-&junit-version; &&
|
|
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>
|
|
|
|
<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 Libraies</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>
|