summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerkan Kaba <serkan@gentoo.org>2011-03-23 19:32:57 +0000
committerSerkan Kaba <serkan@gentoo.org>2011-03-23 19:32:57 +0000
commit9b55ab445cea30369c9e9439033d2978306f6170 (patch)
tree849a49544b41fc8a44feac9b34a7852279b14508 /eclass/java-utils-2.eclass
parentppc64 stable wrt #354519 (diff)
downloadgentoo-2-9b55ab445cea30369c9e9439033d2978306f6170.tar.gz
gentoo-2-9b55ab445cea30369c9e9439033d2978306f6170.tar.bz2
gentoo-2-9b55ab445cea30369c9e9439033d2978306f6170.zip
Use JUnitCore as a runner for junit4 and create symlinks for examples. Improve ejunit docs. Thanks to Ralph Sennhauser <gentoo.sera@bluewin.ch> for both patches.
Diffstat (limited to 'eclass/java-utils-2.eclass')
-rw-r--r--eclass/java-utils-2.eclass12
1 files changed, 11 insertions, 1 deletions
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index 8fc9040fe474..9d6f72ca5b0f 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -6,7 +6,7 @@
#
# Licensed under the GNU General Public License, v2
#
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.137 2011/03/15 19:54:12 serkan Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.138 2011/03/23 19:32:57 serkan Exp $
# -----------------------------------------------------------------------------
# @eclass-begin
@@ -243,6 +243,9 @@ java-pkg_doexamples() {
doins -r "$@"
) || die "Installing examples failed"
fi
+
+ # Let's make a symlink to the directory we have everything else under
+ dosym "${dest}" "${JAVA_PKG_SHAREPATH}/examples" || die
}
# -----------------------------------------------------------------------------
@@ -1787,6 +1790,9 @@ ejunit_() {
fi
local runner=junit.textui.TestRunner
+ if [[ "${junit}" == "junit-4" ]] ; then
+ runner=org.junit.runner.JUnitCore
+ fi
debug-print "Calling: java -cp \"${cp}\" -Djava.awt.headless=true ${runner} ${@}"
java -cp "${cp}" -Djava.awt.headless=true ${runner} "${@}" || die "Running junit failed"
}
@@ -1800,6 +1806,8 @@ ejunit_() {
# Examples:
# ejunit -cp build/classes org.blinkenlights.jid3.test.AllTests
# ejunit org.blinkenlights.jid3.test.AllTests
+# ejunit org.blinkenlights.jid3.test.FirstTest \
+# org.blinkenlights.jid3.test.SecondTest
#
# @param $1 - -cp or -classpath
# @param $2 - classpath; junit and recorded dependencies get appended
@@ -1820,6 +1828,8 @@ ejunit() {
# Examples:
# ejunit4 -cp build/classes org.blinkenlights.jid3.test.AllTests
# ejunit4 org.blinkenlights.jid3.test.AllTests
+# ejunit4 org.blinkenlights.jid3.test.FirstTest \
+# org.blinkenlights.jid3.test.SecondTest
#
# @param $1 - -cp or -classpath
# @param $2 - classpath; junit and recorded dependencies get appended