From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1A171138BED for ; Sun, 25 Oct 2015 14:34:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9C282E07FE; Sun, 25 Oct 2015 14:34:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3634BE07FE for ; Sun, 25 Oct 2015 14:34:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 32E64340845 for ; Sun, 25 Oct 2015 14:34:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6DEFC18BA for ; Sun, 25 Oct 2015 14:34:34 +0000 (UTC) From: "Patrice Clement" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrice Clement" Message-ID: <1445783533.4f6aeab3e6223c8431beec2e580be861d3226266.monsieurp@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/testng/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-java/testng/testng-6.8-r3.ebuild X-VCS-Directories: dev-java/testng/ X-VCS-Committer: monsieurp X-VCS-Committer-Name: Patrice Clement X-VCS-Revision: 4f6aeab3e6223c8431beec2e580be861d3226266 X-VCS-Branch: master Date: Sun, 25 Oct 2015 14:34:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: bd96e31a-d39b-46fb-814f-d18d328b5073 X-Archives-Hash: 30f7f153b7c7cffbbdb8cee3547e046d commit: 4f6aeab3e6223c8431beec2e580be861d3226266 Author: Patrice Clement gentoo org> AuthorDate: Sun Oct 25 14:08:32 2015 +0000 Commit: Patrice Clement gentoo org> CommitDate: Sun Oct 25 14:32:13 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f6aeab3 dev-java/testng: Disable tests. Package-Manager: portage-2.2.20.1 Signed-off-by: Patrice Clement gentoo.org> dev-java/testng/testng-6.8-r3.ebuild | 98 ++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/dev-java/testng/testng-6.8-r3.ebuild b/dev-java/testng/testng-6.8-r3.ebuild new file mode 100644 index 0000000..83f523f --- /dev/null +++ b/dev-java/testng/testng-6.8-r3.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +JAVA_PKG_IUSE="doc examples source test" + +inherit java-pkg-2 java-ant-2 + +DESCRIPTION="Testing framework introducing some new functionalities that make it more powerful and easier to use" +HOMEPAGE="http://testng.org/" +SRC_URI="http://${PN}.org/${P}.zip" + +LICENSE="Apache-2.0" +KEYWORDS="~amd64 ~x86" +SLOT="0" + +CDEPEND=" + dev-java/bsh:0 + dev-java/guice:2 + dev-java/junit:4 + dev-java/ant-core:0 + dev-java/jcommander:0 + dev-java/snakeyaml:1.9" + +DEPEND=">=virtual/jdk-1.6 + app-arch/zip + ${CDEPEND}" + +RDEPEND=">=virtual/jre-1.6 + ${CDEPEND}" + +JAVA_ANT_CLASSPATH_TAGS+=" testng javadocs-current" +JAVA_PKG_BSFIX_NAME="build.xml build-tests.xml" +JAVA_ANT_REWRITE_CLASSPATH="true" +JAVA_ANT_ENCODING="ISO-8859-1" + +EANT_GENTOO_CLASSPATH="ant-core,bsh,guice-2,jcommander,junit-4,snakeyaml-1.9" +EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH}" + +EANT_BUILD_TARGET="build" +EANT_TEST_TARGET="tests" +EANT_DOC_TARGET="javadocs" + +PATCHES=( + "${FILESDIR}"/${P}-remove-ivy-retrieve.patch + "${FILESDIR}"/${P}-remove-jar-bundling.patch +) + +# Error: A JNI error has occurred, please check your installation and try again. +RESTRICT="test" + +java_prepare() { + java-pkg_clean + + cp "${FILESDIR}"/${P}-build-tests.xml build-tests.xml || die + + epatch "${PATCHES[@]}" + + # Removal of tests that break due to restrictions or environment expectations: + # ServiceLoaderTest - Breaks due absolute URL load that Portage prevents; + # we assume the underlying functionality to work, as + # the underlying functionality is simple and should + # show the usage of this package to break. + sed -i '/test.serviceloader.ServiceLoaderTest/d' src/test/resources/testng.xml || die + + # TrueParallelTest - Doesn't always work, especially not on a system + # under load; since this could fail during parallel + # emerges, we assume the underlying functionality to + # work as it has definitely succeeded under lower load. + sed -i '/test.thread.TrueParallelTest/d' src/test/resources/testng.xml || die + + mkdir lib || die +} + +src_test() { + java-pkg-2_src_test + + local tests_file="target/test-output/index.html" + + if [[ ! -f ${tests_file} ]] ; then + die "Tests failed, test output does not exist; a problem with starting the tests." + fi + + grep 'method-stats.*failed' target/test-output/index.html > /dev/null && \ + die "Tests failed; one or more test failed, see ${tests_file} for more details." +} + +src_install() { + java-pkg_newjar target/${P}.jar + java-pkg_dolauncher ${PN} --main org.testng.TestNG + java-pkg_register-ant-task + + use doc && java-pkg_dojavadoc javadocs + use examples && java-pkg_doexamples examples + use source && java-pkg_dosrc src/main/java/{org,com} +}