commit:     0a265ada45d01cf883d55e3367472db981940aef
Author:     Yuan Liao <liaoyuan <AT> gmail <DOT> com>
AuthorDate: Wed Apr  6 17:27:52 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu May 12 07:02:17 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a265ada

dev-java/jna: Use JUnit 4 to run tests for 5.10.0

The test classes excluded by 5.10.0-tests-exclude.patch actually have
some JUnit 4 tests, whereas the rest of the test suite contains JUnit 3
tests.  JUnit 4 can be used to run both types of tests, but JUnit 3
cannot run JUnit 4 tests, which is why the patch was needed.  By
switching to JUnit 4, test coverage increases, and the patch can also be
dropped.

Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 dev-java/jna/files/5.10.0-tests-exclude.patch | 27 ---------------------------
 dev-java/jna/jna-5.10.0.ebuild                |  3 +--
 2 files changed, 1 insertion(+), 29 deletions(-)

diff --git a/dev-java/jna/files/5.10.0-tests-exclude.patch 
b/dev-java/jna/files/5.10.0-tests-exclude.patch
deleted file mode 100644
index e608e2087f44..000000000000
--- a/dev-java/jna/files/5.10.0-tests-exclude.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 2b50e2296c9c9961fd168abe285f773aecd6437a Mon Sep 17 00:00:00 2001
-From: Yuan Liao <[email protected]>
-Date: Thu, 6 Jan 2022 12:21:22 -0800
-Subject: [PATCH] Skip execution of test classes without any tests
-
-Signed-off-by: Yuan Liao <[email protected]>
----
- build.xml | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/build.xml b/build.xml
-index ed104c2..9fb15ae 100644
---- a/build.xml
-+++ b/build.xml
-@@ -1388,6 +1388,9 @@ cd ..
-         <fileset dir="${test.src}" excludes="${tests.exclude-patterns}">
-           <patternset includes="${tests.include}"/>
-           <include name="${tests.platform}"/>
-+          <exclude name="com/sun/jna/DefaultMethodInvocationTest.java"/>
-+          <exclude name="com/sun/jna/ELFAnalyserTest.java"/>
-+          <exclude name="com/sun/jna/PrematureGCTest.java"/>
-           <exclude name="${tests.exclude}"/>
-         </fileset>
-       </batchtest>
--- 
-2.34.1
-

diff --git a/dev-java/jna/jna-5.10.0.ebuild b/dev-java/jna/jna-5.10.0.ebuild
index 80d0409f955c..1d15c940f056 100644
--- a/dev-java/jna/jna-5.10.0.ebuild
+++ b/dev-java/jna/jna-5.10.0.ebuild
@@ -30,7 +30,7 @@ DEPEND="
        dev-java/ant-core:0
        dev-java/asm:9
        test? (
-               dev-java/ant-junit:0
+               dev-java/ant-junit4:0
                dev-java/junit:4
                dev-java/reflections:0
        )
@@ -46,7 +46,6 @@ RDEPEND="
 DOCS=( README.md CHANGES.md OTHERS TODO )
 PATCHES=(
        "${FILESDIR}/${PV}-build.xml.patch"
-       "${FILESDIR}/${PV}-tests-exclude.patch"
        "${FILESDIR}/4.2.2-makefile-flags.patch"
 )
 

Reply via email to