From 94c4ae34fac38a0133ac07fcdbdb2a72196ba37b Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Wed, 17 Jul 2013 19:45:57 +0000 Subject: [PATCH] Update to JUnit-4.11 git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@11448 af4574ff-66df-0310-9fd7-8a98e5e911e0 --- general/prog/junit.xml | 90 +++++++++++++++--------------- introduction/welcome/changelog.xml | 3 + 2 files changed, 47 insertions(+), 46 deletions(-) diff --git a/general/prog/junit.xml b/general/prog/junit.xml index ea6c65ec94..d861b10946 100644 --- a/general/prog/junit.xml +++ b/general/prog/junit.xml @@ -6,10 +6,10 @@ - + - - + + ]> @@ -29,16 +29,13 @@ Introduction to JUnit - Under revison do not use for now. - - The JUnit 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. - + &lfs73_checked; Package Information @@ -62,20 +59,20 @@ - Required Additional Downloads + Additional Downloads - junit-4.11.jar - (http//anduin.linuxfromscratch.org/sources/other/junit-4.11.jar) - + Required file: + http//anduin.linuxfromscratch.org/sources/other/junit-4.11.jar - hamcrest-1.3.tgz - (http//hamcrest.googlecode.com/files/hamcrest-1.3.tgz) - + Required file: + http://hamcrest.googlecode.com/files/hamcrest-1.3.tgz @@ -84,6 +81,7 @@ Required + and @@ -96,55 +94,55 @@ Installation of JUnit To do a full build of JUnit from source, - 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. + 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. Install the JUnit jar file by running the following commands as the root user: install -v -m755 -d /usr/share/java && -cp -v junit.jar /usr/share/java +cp -v junit&junit-version;.jar /usr/share/java - Now install the required hamcrest jar files. Extract the hamcrest-1.3.tgz - files change to the extracted directory. Then, as the + 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: + +tar -xf ../hamcrest-1.3.tgz && +cp -v hamcrest-1.3/hamcrest-core-1.3{,-sources}.jar lib/ && +ant dist + + Testing is automatically done as a part of the build step. + + Install the files in the final location as the root user: + +install -v -m755 -d /usr/share/{doc,java}/junit-&junit-version; && +chown -R root:root . && -install -v -m755 -d /usr/share/java/hamcrest && -cp -v hamcrest-all-1.3.jar /usr/share/java/hamcrest && -ln -sv hamcrest/hamcrest-all-1.3.jar /usr/share/java/hamcrest.jar +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; + + Finally, update the CLASSPATH variable: - Add the junit-&junit-version;.jar and /usr/share/junit-&junit-version; directory to - your system CLASSPATH environment variable: - -export CLASSPATH=$CLASSPATH:\ -/usr/share/java/junit-&junit-version;.jar:/usr/share/java/hamcrest.jar - +export CLASSPATH=$CLASSPATH:/usr/share/java/junit-&junit-version; - + diff --git a/introduction/welcome/changelog.xml b/introduction/welcome/changelog.xml index 6e2a016eba..0b87440913 100644 --- a/introduction/welcome/changelog.xml +++ b/introduction/welcome/changelog.xml @@ -46,6 +46,9 @@ July 17th, 2013 + + [igor] - Update to JUnit-4.11. + [igor] - Downgraded Lua to 5.1.5