diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2024-01-29 11:42:36 +0100 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2024-01-30 10:01:57 +0100 |
commit | 52356a088e0d2a975f5c7e063e38b221bd61cb76 (patch) | |
tree | beba2056ab3939fb8360613f73af9a7ac0403b99 /dev-java/jakarta-mail | |
parent | x11-misc/picom: add 11.1 (diff) | |
download | gentoo-52356a088e0d2a975f5c7e063e38b221bd61cb76.tar.gz gentoo-52356a088e0d2a975f5c7e063e38b221bd61cb76.tar.bz2 gentoo-52356a088e0d2a975f5c7e063e38b221bd61cb76.zip |
dev-java/jakarta-mail: skip a test which fails with jdk:21
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/35067
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/jakarta-mail')
-rw-r--r-- | dev-java/jakarta-mail/files/jakarta-mail-2.0.1-LogManagerPropertiesTest.patch | 13 | ||||
-rw-r--r-- | dev-java/jakarta-mail/jakarta-mail-2.0.1.ebuild | 42 |
2 files changed, 33 insertions, 22 deletions
diff --git a/dev-java/jakarta-mail/files/jakarta-mail-2.0.1-LogManagerPropertiesTest.patch b/dev-java/jakarta-mail/files/jakarta-mail-2.0.1-LogManagerPropertiesTest.patch new file mode 100644 index 000000000000..d29a0bf86572 --- /dev/null +++ b/dev-java/jakarta-mail/files/jakarta-mail-2.0.1-LogManagerPropertiesTest.patch @@ -0,0 +1,13 @@ +diff --git a/src/test/java/com/sun/mail/util/logging/LogManagerPropertiesTest.java b/src/test/java/com/sun/mail/util/logging/LogManagerPropertiesTest.java +index 4581777..3d41b2d 100644 +--- a/src/test/java/com/sun/mail/util/logging/LogManagerPropertiesTest.java ++++ b/src/test/java/com/sun/mail/util/logging/LogManagerPropertiesTest.java +@@ -78,7 +78,7 @@ public class LogManagerPropertiesTest extends AbstractLogging { + assertEquals(Arrays.toString(declared), 0, declared.length); + } + +- @Test ++ @Test @Ignore + public void testCheckAccessPresent() { + LogManager m = LogManager.getLogManager(); + m.checkAccess(); diff --git a/dev-java/jakarta-mail/jakarta-mail-2.0.1.ebuild b/dev-java/jakarta-mail/jakarta-mail-2.0.1.ebuild index 2fcf73b3a66e..0e12088b9f5e 100644 --- a/dev-java/jakarta-mail/jakarta-mail-2.0.1.ebuild +++ b/dev-java/jakarta-mail/jakarta-mail-2.0.1.ebuild @@ -1,9 +1,6 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# Skeleton command: -# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri https://github.com/jakartaee/mail-api/archive/2.0.1.tar.gz --slot 0 --keywords "~amd64" --ebuild jakarta-mail-2.0.1.ebuild - EAPI=8 JAVA_PKG_IUSE="doc source test" @@ -15,31 +12,22 @@ inherit java-pkg-2 java-pkg-simple DESCRIPTION="Implementation of the Jakarta Mail API" HOMEPAGE="https://github.com/jakartaee/mail-api" SRC_URI="https://github.com/jakartaee/mail-api/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/mail-api-${PV}/mail" LICENSE="EPL-1.0 EPL-2.0 GPL-2-with-classpath-exception" SLOT="0" KEYWORDS="amd64 ~arm arm64 ppc64 x86" -# Common dependencies -# POM: pom.xml -# com.sun.activation:jakarta.activation:2.0.1 -> >=dev-java/jakarta-activation-2.0.1:2 - CP_DEPEND="dev-java/jakarta-activation:2" -DEPEND=" - >=virtual/jdk-11:* - ${CP_DEPEND} -" +DEPEND="${CP_DEPEND} + >=virtual/jdk-11:*" -RDEPEND=" - >=virtual/jre-1.8:* - ${CP_DEPEND} -" +RDEPEND="${CP_DEPEND} + >=virtual/jre-1.8:*" DOCS=( ../{CONTRIBUTING,NOTICE,README}.md ) -S="${WORKDIR}/mail-api-${PV}/mail" - JAVA_ENCODING="iso-8859-1" JAVA_SRC_DIR="src/main/java" @@ -56,15 +44,25 @@ src_prepare() { } src_test() { + # test failure with jdk:21 + # 1) testCheckAccessPresent(com.sun.mail.util.logging.LogManagerPropertiesTest) + # java.lang.UnsupportedOperationException: + # The Security Manager is deprecated and will be removed in a future release + # at java.base/java.lang.System.setSecurityManager(System.java:429) + # at com.sun.mail.util.logging.LogManagerPropertiesTest.testCheckAccessPresent(LogManagerPropertiesTest.java:89) + # https://github.com/jakartaee/mail-api/pull/704#issuecomment-1911924741 + local vm_version="$(java-config -g PROVIDES_VERSION)" + if ver_test "${vm_version}" -ge 21; then + eapply "${FILESDIR}/jakarta-mail-2.0.1-LogManagerPropertiesTest.patch" + fi pushd src/test/java || die # Selection according to 137,138 pom.xml - # This one does not run because of + # MailHandlerTest does not run because of # "java.io.IOException: Permission denied" # excluding it costs 141 tests. - # 1) com.sun.mail.util.logging.MailHandlerTest local JAVA_TEST_RUN_ONLY=$(find * \ - \( -wholename "**/*TestSuite.java" \ - -o -wholename "**/*Test.java" \) \ + \( -path "**/*TestSuite.java" \ + -o -path "**/*Test.java" \) \ ! -name "MailHandlerTest.java" \ ) JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}" |