diff options
author | Tom Wijsman <tomwij@gentoo.org> | 2013-10-12 16:21:20 +0000 |
---|---|---|
committer | Tom Wijsman <tomwij@gentoo.org> | 2013-10-12 16:21:20 +0000 |
commit | 26f1a54c4dcceecf757a6fcc5bbd3ab79f5292a8 (patch) | |
tree | c1da2214ff2c07e9dfc3a92a3b5713b26880bbe7 | |
parent | Remove RDEPEND on bison and flex, bug 487318 (diff) | |
download | historical-26f1a54c4dcceecf757a6fcc5bbd3ab79f5292a8.tar.gz historical-26f1a54c4dcceecf757a6fcc5bbd3ab79f5292a8.tar.bz2 historical-26f1a54c4dcceecf757a6fcc5bbd3ab79f5292a8.zip |
New ebuild for dev-java/testng, testing framework introducing some new functionalities that make it more powerful and easier to use; merged work from dmol and Pariksheet Nanda from bug #146226 as well as with the ebuild by ercpe from lh-overlay, fixes bug #146226 and bug #373561.
Package-Manager: portage-HEAD/cvs/Linux x86_64
Manifest-Sign-Key: 0x6D34E57D
-rw-r--r-- | dev-java/testng/ChangeLog | 15 | ||||
-rw-r--r-- | dev-java/testng/Manifest | 22 | ||||
-rw-r--r-- | dev-java/testng/files/build-tests.xml | 188 | ||||
-rw-r--r-- | dev-java/testng/files/testng-6.8-build-tests.xml | 188 | ||||
-rw-r--r-- | dev-java/testng/files/testng-6.8-remove-ivy-retrieve.patch | 22 | ||||
-rw-r--r-- | dev-java/testng/files/testng-6.8-remove-jar-bundling.patch | 60 | ||||
-rw-r--r-- | dev-java/testng/metadata.xml | 5 | ||||
-rw-r--r-- | dev-java/testng/testng-6.8.ebuild | 88 |
8 files changed, 588 insertions, 0 deletions
diff --git a/dev-java/testng/ChangeLog b/dev-java/testng/ChangeLog new file mode 100644 index 000000000000..170b2036cc50 --- /dev/null +++ b/dev-java/testng/ChangeLog @@ -0,0 +1,15 @@ +# ChangeLog for dev-java/testng +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/testng/ChangeLog,v 1.1 2013/10/12 16:21:15 tomwij Exp $ + +*testng-6.8 (12 Oct 2013) + + 12 Oct 2013; Tom Wijsman <TomWij@gentoo.org> +files/build-tests.xml, + +files/testng-6.8-build-tests.xml, + +files/testng-6.8-remove-ivy-retrieve.patch, + +files/testng-6.8-remove-jar-bundling.patch, +metadata.xml, + +testng-6.8.ebuild: + New ebuild for dev-java/testng, testing framework introducing some new + functionalities that make it more powerful and easier to use; merged work from + dmol and Pariksheet Nanda from bug #146226 as well as with the ebuild by ercpe + from lh-overlay, fixes bug #146226 and bug #373561. diff --git a/dev-java/testng/Manifest b/dev-java/testng/Manifest new file mode 100644 index 000000000000..8676dad8a414 --- /dev/null +++ b/dev-java/testng/Manifest @@ -0,0 +1,22 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX build-tests.xml 6502 SHA256 b1a50752751d929521fbdf099a3f76e101f6eb29b051adee61a4f3b22921996c SHA512 4f700170b5b28a35097de68bdf9e612304c0a910b7bbb6a650bfd62a4ca0685d8e577039b9500e58417add7686396343234200e93bf895a3b03655f22eeef289 WHIRLPOOL 8d006b0aaafb908f303c0beb7fdcf2907981776393a81ed4748bf4c44958cd2b1128742a92c8af5030d02781214d1c7bdcd80db0a4bc2e44cbc03361fd4470d1 +AUX testng-6.8-build-tests.xml 6502 SHA256 b1a50752751d929521fbdf099a3f76e101f6eb29b051adee61a4f3b22921996c SHA512 4f700170b5b28a35097de68bdf9e612304c0a910b7bbb6a650bfd62a4ca0685d8e577039b9500e58417add7686396343234200e93bf895a3b03655f22eeef289 WHIRLPOOL 8d006b0aaafb908f303c0beb7fdcf2907981776393a81ed4748bf4c44958cd2b1128742a92c8af5030d02781214d1c7bdcd80db0a4bc2e44cbc03361fd4470d1 +AUX testng-6.8-remove-ivy-retrieve.patch 921 SHA256 3212cda09f6f5837e8cf30b7f93679076d4fb9e8c17d27ae8dc9047637c1cc71 SHA512 0feed59639db2e23200b4eb4b6ddaf31932bc7b63e7f86b9fbd9ec12c26528783a95f3c0bd16b3a8832515e53da22e576156c29d4a479f07dc5d73f9e8e52f1c WHIRLPOOL ed5dad686a230d9aeb58b3847200cc0fcacd31a0a4d5a81e6cb74b4ca6a1799fc133d1ca06705789e33356f80b50d69ff41f6d95d57a8b9e0f8ba20d4b29493c +AUX testng-6.8-remove-jar-bundling.patch 2234 SHA256 cab8ec606462af569afe0f7674e1a6ffb2c3229965fa014a3eb82b8431cab6d0 SHA512 13129389a4fb1b7acc693c4acf4196bc10f5fe09818c89bf2e848d8bc04a57e9e5761097a7a634a8821bd5d0e59446c212b3da827f6f3da27a1e5cd3888e5229 WHIRLPOOL c5015cec67f843c483f6ae7ec085adefefe137cac19d4bc0057630e7835bc752cf8dcbfa862cf31633e8aa68936ec21647af41bfdbe910e197c9772483fac13b +DIST testng-6.8.zip 11550802 SHA256 72c7241109b149caea01af5f5c37c86b61b08f15864a8a40e15d069593625e0c SHA512 2e8ad30a2c2f68d0aad584ef92246381c8adf8a893af2ca9ff8fb7d304c26956dfc6564f120de80d22e3e7a53a1402e3869f19ef0e6a69c674cbe35a58811920 WHIRLPOOL b7cf05963aaba3009d7326fee12694c32798787ee4295044daabdcf6b5a50dbb4b17f2a201dcdcd6d191bbc6665c12db789be80e71625eb8d08ca29b3cdfcff2 +EBUILD testng-6.8.ebuild 2865 SHA256 091375254db1ba2e3c11f08ba1e804f24324db4d58b282b84c761bf703bd3787 SHA512 48963b040e10596575f41cd01296378b914361caa461b1db97874a145de51bba89c3575267a9d7d98d8e9c72ab4c2c75292104eb2b7b55ed95921a533064ffed WHIRLPOOL e8a3562fa981d5f69ae454c99931a4a8fc3e1152e9457614ec6584b348073284a6b72ce7329f5045772711a067923800d8d1c564bb9652a00db5931d6e7e3cc2 +MISC ChangeLog 758 SHA256 cffb6ddb703e0896759236ecb80d3cf8502c0923feadd8c1dfdd59a6c91b704d SHA512 7517294b5a165e237123cc52cf6773394fc4031e9f01b46e3d3b1e2a0bc8aac6071dc5204c853f0d932347a276df7d251a8fb16ecb9e2064c04c620d5ccf8d6c WHIRLPOOL 48f785e959c1e9328f9e295b3dc43059137468071b734b6039ef65cad0edc3c62ebf17756f7ef7eca6404b6e90f48aab0bfb4a3beeaa93eaa70817ea608de894 +MISC metadata.xml 157 SHA256 295d02c5805b0257938eb80314b371daac94b8d6ea85629a902de7a824adc0c9 SHA512 bbae663e26f48fdc5e272adc2b06c14f77f34c53caf84acb53908ff036e7c12a3edbbc0929d2db56bee861a453381d979c7e0983a23716f629ed2135c22ffece WHIRLPOOL 887e153e2481e7d76f0f1b67a395f10f0328b93930185ecdb8fcb5fe3c50f839086a18831d61cf45b34657aaffca6c3b7900cf3c04b712846a05027a84602448 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (GNU/Linux) + +iQEcBAEBCAAGBQJSWXWrAAoJEJWyH81tNOV9iQAH/3nPTrsnMQSaZPQD3OHx8qMf +SYicxnwrkVkW5RB01f7UDC7X0daKExlsvYQS3hruy+Ast6ABHNgK3ncfHcLApi8g +L1CoECscoj8rCikwwv8/8Js12V5TN5UDLpH8/AtMGO8iN+1n/wEYWG109y4wtmaP +yo681kPnOa49azaUcubN8aodZ2qEpnFEBfiSNtDsG4yRyxB714EPROzIf9Sh119c +kVoedv9X2l8goqaTYOymj87ShM3kx9UNqnFwNOzINKZqMYp+obB/ztal1JQnGIYm +W51wmbanjOPydgU93uXrAJYvedivfJafixctrs/G7ECh4GX3r2G4awWA6fC9dhs= +=Eb0T +-----END PGP SIGNATURE----- diff --git a/dev-java/testng/files/build-tests.xml b/dev-java/testng/files/build-tests.xml new file mode 100644 index 000000000000..e94606b60cea --- /dev/null +++ b/dev-java/testng/files/build-tests.xml @@ -0,0 +1,188 @@ +<!-- From: https://github.com/cbeust/testng/blob/master/build-tests.xml --> + +<project name="testng" default="all" basedir="."> + + <property file="build.properties"/> + + <property name="report.dir" value="${test.output.dir}"/> + <property name="junit.report.dir" value="${report.dir}/test-tmp"/> + <property name="testng.report.dir" value="${report.dir}"/> + + <target name="all" depends="prepare,compile,run,reports,done"/> + + <!-- ==================================================================== --> + <!-- Compile --> + <!-- ==================================================================== --> + <path id="compile.cp"> + <pathelement location="${testng.jar}" /> + <fileset dir="${lib.dir}" includes="${guice2.jar}" /> + <fileset dir="${lib.dir}" includes="${junit.jar}" /> + </path> + + <target name="env:info"> + <echo> +BASEDIR =${basedir} +TEST.DIR =${test.dir} +TEST.BUILD.DIR =${test.build.dir} +REPORT.DIR =${report.dir} +JUNIT.REPORT.DIR =${junit.report.dir} +TESTNG.REPORT.DIR=${testng.report.dir} + </echo> + </target> + + <target name="compile" depends="prepare"> + <echo message=" -- Compiling tests --"/> + + <property name="build.compiler" value="modern"/> + <javac debug="true" + source="1.5" + classpathref="compile.cp" + srcdir="${test.dir}" + destdir="${test.build.dir}" + /> + + </target> + + <target name="prepare"> + <tstamp/> + <mkdir dir="${test.build.dir}"/> + <mkdir dir="${junit.report.dir}"/> + <mkdir dir="${testng.report.dir}"/> + + <taskdef name="testng" + classname="org.testng.TestNGAntTask" + classpath="${build.dir}"/> + </target> + +<!-- + <property name="cobertura.dir" value="../cobertura-1.9.4.1" /> + + <path id="cobertura.classpath"> + <fileset dir="${cobertura.dir}"> + <include name="cobertura.jar" /> + <include name="lib/**/*.jar" /> + </fileset> + </path> +--> + + <!-- ==================================================================== --> + <!-- Run --> + <!-- ==================================================================== --> + + <path id="run.cp"> +<!-- + <path location="target/instrumented-classes" /> + <path refid="cobertura.classpath" /> +--> + <path refid="compile.cp"/> + <pathelement location="${test.build.dir}"/> + </path> + + <target name="run" description="Run tests" depends="compile,copy-resources"> + <echo message=" -- Running tests --"/> + <echo message=" -- ${testng.jar} --" /> + <testng classpathref="run.cp" + outputdir="${testng.report.dir}"> + <xmlfileset dir="${test.resources.dir}" includes="testng.xml"/> + <jvmarg value="-Dtest.resources.dir=${test.resources.dir}" /> + <jvmarg value="-Dsun.io.serialization.extendedDebugInfo=true" /> + </testng> + </target> + + <target name="copy-resources" description="Copies resources."> + <copy verbose="false" + file="${src.resources.dir}/testngtasks" + todir="${build.dir}" /> + <copy todir="${build.dir}"> + <fileset dir="${src.resources.dir}"> + <exclude name="**/.*" /> + <exclude name="**/CVS/*" /> + </fileset> + </copy> + </target> + + <target name="run:single" description="Run 1 property file named with the ant property test" depends="compile"> + <echo message=" -- testng-tests-run1 --"/> + + <testng outputdir="${testng.report.dir}" + classpathref="run.cp" + useDefaultListeners="true" + outputDir="${testng.report.dir}"> + <xmlfileset dir="${test.resources.dir}" includes="testng-single.xml"/> + </testng> + + <echo>Report created in open ${testng.report.dir}/index.html</echo> + </target> + + <target name="run:antprop" description="Run a test to see if ant system propertes are passed correctly" depends="compile"> + <echo message=" -- testng-tests-run-antprop --"/> + <property name="syspropset1" value="value 1"/> + <property name="syspropset2" value="value 2"/> + <propertyset id="propset1"> + <propertyref name="syspropset1"/> + <propertyref name="syspropset2"/> + </propertyset> + + <testng outputdir="${testng.report.dir}" + classpathref="run.cp"> + <xmlfileset dir="${test.resources.dir}" includes="testng-single3.xml"/> + <propertyset refid="propset1"/> + <sysproperty key="sysprop1" value="value 3"/> + </testng> + </target> + + <!-- ==================================================================== --> + <!-- Run specific configuration --> + <!-- ==================================================================== --> + <target name="run:conf" + if="testng.conf" + depends="clean:reports,compile" + description="Run specified tests"> + <echo message=" -- testng-tests-run --"/> + <echo message="using: ${testng.conf}.xml"/> + + <testng classpathref="run.cp" + outputDir="${testng.report.dir}"> + <xmlfileset dir="${test.resources.dir}" includes="${testng.conf}.xml"/> + </testng> + + <antcall target="clean.tmp"/> + </target> + + + <!-- ==================================================================== --> + <!-- Reports --> + <!-- ==================================================================== --> + + <target name="reports"> + <junitreport todir="${junit.report.dir}"> + <fileset dir="${testng.report.dir}"> + <include name="*.xml"/> + <exclude name="testng-failed.xml"/> + <exclude name="testng-results.xml" /> + </fileset> + <report format="noframes" todir="${junit.report.dir}"/> + </junitreport> + </target> + + + <target name="clean.tmp"> + <delete dir="${test.output.dir}"/> + </target> + + <target name="clean:reports"> + <delete dir="${report.dir}"/> + <delete dir="${junit.report.dir}"/> + </target> + + <target name="clean" depends="clean.tmp,clean:reports"> + <echo message=" -- test clean --"/> + + <delete dir="${test.build.dir}"/> + </target> + + <target name="done"> + <echo>Reports can be found in: open ${testng.report.dir}/index.html</echo> + </target> + +</project> diff --git a/dev-java/testng/files/testng-6.8-build-tests.xml b/dev-java/testng/files/testng-6.8-build-tests.xml new file mode 100644 index 000000000000..e94606b60cea --- /dev/null +++ b/dev-java/testng/files/testng-6.8-build-tests.xml @@ -0,0 +1,188 @@ +<!-- From: https://github.com/cbeust/testng/blob/master/build-tests.xml --> + +<project name="testng" default="all" basedir="."> + + <property file="build.properties"/> + + <property name="report.dir" value="${test.output.dir}"/> + <property name="junit.report.dir" value="${report.dir}/test-tmp"/> + <property name="testng.report.dir" value="${report.dir}"/> + + <target name="all" depends="prepare,compile,run,reports,done"/> + + <!-- ==================================================================== --> + <!-- Compile --> + <!-- ==================================================================== --> + <path id="compile.cp"> + <pathelement location="${testng.jar}" /> + <fileset dir="${lib.dir}" includes="${guice2.jar}" /> + <fileset dir="${lib.dir}" includes="${junit.jar}" /> + </path> + + <target name="env:info"> + <echo> +BASEDIR =${basedir} +TEST.DIR =${test.dir} +TEST.BUILD.DIR =${test.build.dir} +REPORT.DIR =${report.dir} +JUNIT.REPORT.DIR =${junit.report.dir} +TESTNG.REPORT.DIR=${testng.report.dir} + </echo> + </target> + + <target name="compile" depends="prepare"> + <echo message=" -- Compiling tests --"/> + + <property name="build.compiler" value="modern"/> + <javac debug="true" + source="1.5" + classpathref="compile.cp" + srcdir="${test.dir}" + destdir="${test.build.dir}" + /> + + </target> + + <target name="prepare"> + <tstamp/> + <mkdir dir="${test.build.dir}"/> + <mkdir dir="${junit.report.dir}"/> + <mkdir dir="${testng.report.dir}"/> + + <taskdef name="testng" + classname="org.testng.TestNGAntTask" + classpath="${build.dir}"/> + </target> + +<!-- + <property name="cobertura.dir" value="../cobertura-1.9.4.1" /> + + <path id="cobertura.classpath"> + <fileset dir="${cobertura.dir}"> + <include name="cobertura.jar" /> + <include name="lib/**/*.jar" /> + </fileset> + </path> +--> + + <!-- ==================================================================== --> + <!-- Run --> + <!-- ==================================================================== --> + + <path id="run.cp"> +<!-- + <path location="target/instrumented-classes" /> + <path refid="cobertura.classpath" /> +--> + <path refid="compile.cp"/> + <pathelement location="${test.build.dir}"/> + </path> + + <target name="run" description="Run tests" depends="compile,copy-resources"> + <echo message=" -- Running tests --"/> + <echo message=" -- ${testng.jar} --" /> + <testng classpathref="run.cp" + outputdir="${testng.report.dir}"> + <xmlfileset dir="${test.resources.dir}" includes="testng.xml"/> + <jvmarg value="-Dtest.resources.dir=${test.resources.dir}" /> + <jvmarg value="-Dsun.io.serialization.extendedDebugInfo=true" /> + </testng> + </target> + + <target name="copy-resources" description="Copies resources."> + <copy verbose="false" + file="${src.resources.dir}/testngtasks" + todir="${build.dir}" /> + <copy todir="${build.dir}"> + <fileset dir="${src.resources.dir}"> + <exclude name="**/.*" /> + <exclude name="**/CVS/*" /> + </fileset> + </copy> + </target> + + <target name="run:single" description="Run 1 property file named with the ant property test" depends="compile"> + <echo message=" -- testng-tests-run1 --"/> + + <testng outputdir="${testng.report.dir}" + classpathref="run.cp" + useDefaultListeners="true" + outputDir="${testng.report.dir}"> + <xmlfileset dir="${test.resources.dir}" includes="testng-single.xml"/> + </testng> + + <echo>Report created in open ${testng.report.dir}/index.html</echo> + </target> + + <target name="run:antprop" description="Run a test to see if ant system propertes are passed correctly" depends="compile"> + <echo message=" -- testng-tests-run-antprop --"/> + <property name="syspropset1" value="value 1"/> + <property name="syspropset2" value="value 2"/> + <propertyset id="propset1"> + <propertyref name="syspropset1"/> + <propertyref name="syspropset2"/> + </propertyset> + + <testng outputdir="${testng.report.dir}" + classpathref="run.cp"> + <xmlfileset dir="${test.resources.dir}" includes="testng-single3.xml"/> + <propertyset refid="propset1"/> + <sysproperty key="sysprop1" value="value 3"/> + </testng> + </target> + + <!-- ==================================================================== --> + <!-- Run specific configuration --> + <!-- ==================================================================== --> + <target name="run:conf" + if="testng.conf" + depends="clean:reports,compile" + description="Run specified tests"> + <echo message=" -- testng-tests-run --"/> + <echo message="using: ${testng.conf}.xml"/> + + <testng classpathref="run.cp" + outputDir="${testng.report.dir}"> + <xmlfileset dir="${test.resources.dir}" includes="${testng.conf}.xml"/> + </testng> + + <antcall target="clean.tmp"/> + </target> + + + <!-- ==================================================================== --> + <!-- Reports --> + <!-- ==================================================================== --> + + <target name="reports"> + <junitreport todir="${junit.report.dir}"> + <fileset dir="${testng.report.dir}"> + <include name="*.xml"/> + <exclude name="testng-failed.xml"/> + <exclude name="testng-results.xml" /> + </fileset> + <report format="noframes" todir="${junit.report.dir}"/> + </junitreport> + </target> + + + <target name="clean.tmp"> + <delete dir="${test.output.dir}"/> + </target> + + <target name="clean:reports"> + <delete dir="${report.dir}"/> + <delete dir="${junit.report.dir}"/> + </target> + + <target name="clean" depends="clean.tmp,clean:reports"> + <echo message=" -- test clean --"/> + + <delete dir="${test.build.dir}"/> + </target> + + <target name="done"> + <echo>Reports can be found in: open ${testng.report.dir}/index.html</echo> + </target> + +</project> diff --git a/dev-java/testng/files/testng-6.8-remove-ivy-retrieve.patch b/dev-java/testng/files/testng-6.8-remove-ivy-retrieve.patch new file mode 100644 index 000000000000..2d7e91e74587 --- /dev/null +++ b/dev-java/testng/files/testng-6.8-remove-ivy-retrieve.patch @@ -0,0 +1,22 @@ +--- a/build.xml ++++ b/build.xml +@@ -12,7 +12,7 @@ + <!-- ====================================================================== -->
+ <!-- PREPARE -->
+ <!-- ====================================================================== -->
+- <target name="prepare" depends="retrieve-dependencies"
++ <target name="prepare"
+ description="Performs all preparations required to build.">
+ <tstamp />
+ <mkdir dir="${build.dir}" />
+@@ -419,10 +419,6 @@ + <!-- Ivy -->
+ <!-- ==================================================================== -->
+
+- <target name="retrieve-dependencies" description="Retrieve dependencies with ivy">
+- <ivy:retrieve log="quiet" />
+- </target>
+-
+ <target name="publish">
+ <ivy:resolve />
+ <mkdir dir="dist/jars" />
diff --git a/dev-java/testng/files/testng-6.8-remove-jar-bundling.patch b/dev-java/testng/files/testng-6.8-remove-jar-bundling.patch new file mode 100644 index 000000000000..ca793971c73a --- /dev/null +++ b/dev-java/testng/files/testng-6.8-remove-jar-bundling.patch @@ -0,0 +1,60 @@ +--- a/build.xml ++++ b/build.xml +@@ -73,9 +73,6 @@ + <param name="jar.file" value="${testng.jar}" />
+ </antcall>
+ <jar jarfile="${testng.jar}" update="true">
+- <zipfileset src="${lib.dir}/${beanshell.jar}" />
+- <zipfileset src="${lib.dir}/${jcommander.jar}" />
+- <zipfileset src="${lib.dir}/${yaml.jar}" />
+ </jar>
+
+ </target>
+@@ -195,10 +192,6 @@ + <param name="jar.file" value="${other.jars.dir}/${testng.junit.jar}" />
+ </antcall>
+ <jar jarfile="${other.jars.dir}/${testng.junit.jar}" update="true">
+- <zipfileset src="${lib.dir}/${beanshell.jar}" />
+- <zipfileset src="${lib.dir}/${jcommander.jar}" />
+- <zipfileset src="${lib.dir}/${junit.jar}" />
+- <zipfileset src="${lib.dir}/${yaml.jar}" />
+ </jar>
+ </target>
+
+@@ -207,9 +200,6 @@ + <param name="jar.file" value="${other.jars.dir}/${testng.nobsh.guice.jar}" />
+ </antcall>
+ <jar jarfile="${other.jars.dir}/${testng.nobsh.guice.jar}" update="true">
+- <zipfileset src="${lib.dir}/${guice2.jar}" />
+- <zipfileset src="${lib.dir}/${jcommander.jar}" />
+- <zipfileset src="${lib.dir}/${junit.jar}" />
+ </jar>
+ </target>
+
+@@ -218,9 +208,6 @@ + <param name="jar.file" value="${other.jars.dir}/${testng.bsh.noguice.jar}" />
+ </antcall>
+ <jar jarfile="${other.jars.dir}/${testng.bsh.noguice.jar}" update="true">
+- <zipfileset src="${lib.dir}/${beanshell.jar}" />
+- <zipfileset src="${lib.dir}/${jcommander.jar}" />
+- <zipfileset src="${lib.dir}/${junit.jar}" />
+ </jar>
+ </target>
+
+@@ -229,8 +216,6 @@ + <param name="jar.file" value="${other.jars.dir}/${testng.nobsh.noguice.jar}" />
+ </antcall>
+ <jar jarfile="${other.jars.dir}/${testng.bsh.noguice.jar}" update="true">
+- <zipfileset src="${lib.dir}/${jcommander.jar}" />
+- <zipfileset src="${lib.dir}/${junit.jar}" />
+ </jar>
+ </target>
+
+@@ -239,7 +224,6 @@ + <param name="jar.file" value="${other.jars.dir}/${testng.dist.jar}" />
+ </antcall>
+ <jar jarfile="${other.jars.dir}/${testng.dist.jar}" update="true">
+- <zipfileset src="${lib.dir}/${jcommander.jar}" />
+ </jar>
+ </target>
+
diff --git a/dev-java/testng/metadata.xml b/dev-java/testng/metadata.xml new file mode 100644 index 000000000000..838c00a4a448 --- /dev/null +++ b/dev-java/testng/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>java</herd> +</pkgmetadata> diff --git a/dev-java/testng/testng-6.8.ebuild b/dev-java/testng/testng-6.8.ebuild new file mode 100644 index 000000000000..816d2a98e722 --- /dev/null +++ b/dev-java/testng/testng-6.8.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/testng/testng-6.8.ebuild,v 1.1 2013/10/12 16:21:15 tomwij Exp $ + +EAPI="5" + +JAVA_PKG_IUSE="doc examples source test" +WANT_ANT_TASKS="ant-junit" + +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" +SLOT="0" + +CDEPEND="dev-java/ant-core:0 + dev-java/bsh:0 + dev-java/guice:2 + dev-java/jcommander:0 + dev-java/junit:4 + dev-java/snakeyaml:0" + +DEPEND=">=virtual/jdk-1.5 + ${CDEPEND}" + +RDEPEND=">=virtual/jre-1.5 + ${CDEPEND}" + +JAVA_PKG_BSFIX_NAME="build.xml build-tests.xml" +JAVA_ANT_REWRITE_CLASSPATH="true" +JAVA_ANT_CLASSPATH_TAGS+=" testng javadocs-current" +EANT_GENTOO_CLASSPATH="ant-core,bsh,guice-2,jcommander,junit-4,snakeyaml" +EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH}" + +EANT_BUILD_TARGET="build" +EANT_TEST_TARGET="tests" +EANT_DOC_TARGET="javadocs" + +java_prepare() { + find . -name '*.jar' -print -delete || die + + cp "${FILESDIR}"/${P}-build-tests.xml build-tests.xml || die + + epatch "${FILESDIR}"/${P}-remove-ivy-retrieve.patch + epatch "${FILESDIR}"/${P}-remove-jar-bundling.patch + + # 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() { + local tests_file="target/test-output/index.html" + + java-pkg-2_src_test + + 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} +} |