summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2022-04-13 07:57:35 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2022-04-14 07:13:59 +0200
commitd6ae32f567c68ad5179cd4d79175082bb53bd3e5 (patch)
tree004aa6222ada8e9e3d11a3d16210c54b2edb701f /dev-java
parentdev-ruby/rack-attack: add 6.6.1 (diff)
downloadgentoo-d6ae32f567c68ad5179cd4d79175082bb53bd3e5.tar.gz
gentoo-d6ae32f567c68ad5179cd4d79175082bb53bd3e5.tar.bz2
gentoo-d6ae32f567c68ad5179cd4d79175082bb53bd3e5.zip
dev-java/testng: update EAPI 5 -> 8
Bug: https://bugs.gentoo.org/826494 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/25015 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/testng/testng-6.9.10-r1.ebuild70
1 files changed, 70 insertions, 0 deletions
diff --git a/dev-java/testng/testng-6.9.10-r1.ebuild b/dev-java/testng/testng-6.9.10-r1.ebuild
new file mode 100644
index 000000000000..93be01d33c9d
--- /dev/null
+++ b/dev-java/testng/testng-6.9.10-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Testing framework inspired by JUnit and NUnit with new features"
+HOMEPAGE="https://testng.org/"
+SRC_URI="https://github.com/cbeust/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+SLOT="0"
+IUSE="test"
+RESTRICT="test" # Occasionally fail or run *REALLY* slowly.
+
+CDEPEND="dev-java/bsh:0
+ dev-java/guice:4
+ dev-java/junit:4
+ dev-java/ant-core:0
+ dev-java/snakeyaml:0
+ dev-java/jcommander:0"
+
+DEPEND="${CDEPEND}
+ >=virtual/jdk-1.8:*
+ test? ( dev-java/assertj-core:2 )"
+
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.8:*"
+
+S="${WORKDIR}/${P}"
+JAVA_SRC_DIR="src/main/java"
+JAVA_GENTOO_CLASSPATH="ant-core,bsh,guice-4,jcommander,junit-4,snakeyaml"
+
+src_prepare() {
+ default
+ java-pkg_clean ! -path "./src/*"
+
+ cp -v src/generated/java/org/testng/internal/VersionTemplateJava \
+ src/main/java/org/testng/internal/Version.java || die
+}
+
+src_compile() {
+ java-pkg-simple_src_compile
+ java-pkg_addres ${PN}.jar src/main/resources
+}
+
+src_test() {
+ local DIR=src/test/java
+ local RES=src/test/resources
+ local CP=${PN}.jar:$(java-pkg_getjars --with-dependencies "${JAVA_GENTOO_CLASSPATH},assertj-core-2")
+
+ ejavac -cp "${CP}" -d ${DIR} $(find ${DIR} -name "*.java")
+ java -cp "${RES}:${DIR}:${CP}" -Dtest.resources.dir=${RES} org.testng.TestNG -listener test.invokedmethodlistener.MyListener src/test/resources/testng.xml || die
+}
+
+src_install() {
+ java-pkg-simple_src_install
+ java-pkg_dolauncher ${PN} --main org.testng.TestNG
+ java-pkg_register-ant-task
+
+ dodoc {ANNOUNCEMENT,CHANGES,TODO}.txt
+
+ if use doc; then
+ docinto html
+ dodoc -r doc
+ fi
+}