diff options
author | Ralph Sennhauser <sera@gentoo.org> | 2012-03-23 16:33:05 +0000 |
---|---|---|
committer | Ralph Sennhauser <sera@gentoo.org> | 2012-03-23 16:33:05 +0000 |
commit | 83925b4a035ca19e5ed1d09365c3d07acb269124 (patch) | |
tree | 3539abc6859934408af0e74e244cddcbe2ce1f91 /dev-java | |
parent | Stable for HPPA (bug #407643). (diff) | |
download | gentoo-2-83925b4a035ca19e5ed1d09365c3d07acb269124.tar.gz gentoo-2-83925b4a035ca19e5ed1d09365c3d07acb269124.tar.bz2 gentoo-2-83925b4a035ca19e5ed1d09365c3d07acb269124.zip |
Fix running tests. #294289
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'dev-java')
-rw-r--r-- | dev-java/jna/ChangeLog | 5 | ||||
-rw-r--r-- | dev-java/jna/jna-3.4.0.ebuild | 35 |
2 files changed, 27 insertions, 13 deletions
diff --git a/dev-java/jna/ChangeLog b/dev-java/jna/ChangeLog index c5cf25ab6126..4c3de93152a4 100644 --- a/dev-java/jna/ChangeLog +++ b/dev-java/jna/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for dev-java/jna # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jna/ChangeLog,v 1.12 2012/03/23 15:27:47 sera Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/jna/ChangeLog,v 1.13 2012/03/23 16:33:05 sera Exp $ + + 23 Mar 2012; Ralph Sennhauser <sera@gentoo.org> jna-3.4.0.ebuild: + Fix running tests. #294289 23 Mar 2012; Ralph Sennhauser <sera@gentoo.org> jna-3.4.0.ebuild: Use vcs-snapshot eclass for github download. diff --git a/dev-java/jna/jna-3.4.0.ebuild b/dev-java/jna/jna-3.4.0.ebuild index 0c79717b7a6e..492b1c8fb949 100644 --- a/dev-java/jna/jna-3.4.0.ebuild +++ b/dev-java/jna/jna-3.4.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jna/jna-3.4.0.ebuild,v 1.3 2012/03/23 15:27:47 sera Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/jna/jna-3.4.0.ebuild,v 1.4 2012/03/23 16:33:05 sera Exp $ EAPI="4" @@ -16,6 +16,7 @@ LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" IUSE="+awt +nio-buffers" +REQUIRED_USE="test? ( awt nio-buffers )" COMMON_DEP=" virtual/libffi" @@ -57,6 +58,27 @@ java_prepare() { EANT_EXTRA_ARGS="-Ddynlink.native=true" +EANT_TEST_ANT_TASKS="ant-junit ant-nodeps ant-trax" +src_test() { + local sysprops="" + + # crashes vm (segfault) + sed -i -e 's|testRegisterMethods|no&|' test/com/sun/jna/DirectTest.java || die + + # crashes vm, java 7 only (icedtea-7, oracle-jdk-bin-1.7) + sed -i -e 's|testGCCallbackOnFinalize|no&|' test/com/sun/jna/CallbacksTest.java || die + + sysprops+=" -Djava.awt.headless=true" + sysprops+=" -Djava.io.tmpdir=${T}" #to ensure exec mount + + mkdir -p lib || die + java-pkg_jar-from --into lib --build-only junit + + # need to use _JAVA_OPTIONS or add them to the build.xml. ANT_OPTS won't + # survive the junit task. + _JAVA_OPTIONS="${sysprops}" java-pkg-2_src_test +} + src_install() { java-pkg_dojar build/${PN}.jar java-pkg_dojar contrib/platform/dist/platform.jar @@ -64,14 +86,3 @@ src_install() { use source && java-pkg_dosrc src/com use doc && java-pkg_dojavadoc doc/javadoc } - -src_test() { - unset DISPLAY - - mkdir -p lib - java-pkg_jar-from --into lib --build-only junit - - ANT_TASKS="ant-junit ant-nodeps ant-trax" \ - ANT_OPTS="-Djava.awt.headless=true" eant \ - ${EANT_EXTRA_ARGS} test -} |