From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B3B76158099 for ; Fri, 1 Dec 2023 10:02:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DEB312BC014; Fri, 1 Dec 2023 10:02:43 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CA3412BC014 for ; Fri, 1 Dec 2023 10:02:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 147A1335D6B for ; Fri, 1 Dec 2023 10:02:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5FF301305 for ; Fri, 1 Dec 2023 10:02:41 +0000 (UTC) From: "Miroslav Šulc" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Miroslav Šulc" Message-ID: <1701424949.eabdf0892f779c6f232d4ad6b40bb846072ab5c1.fordfrog@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/felix-gogo-runtime/, dev-java/felix-gogo-runtime/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-java/felix-gogo-runtime/felix-gogo-runtime-1.1.6.ebuild dev-java/felix-gogo-runtime/files/felix-gogo-runtime-1.1.6-skip-tests-non-java-8.patch X-VCS-Directories: dev-java/felix-gogo-runtime/ dev-java/felix-gogo-runtime/files/ X-VCS-Committer: fordfrog X-VCS-Committer-Name: Miroslav Šulc X-VCS-Revision: eabdf0892f779c6f232d4ad6b40bb846072ab5c1 X-VCS-Branch: master Date: Fri, 1 Dec 2023 10:02:41 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: bfbb6e49-3240-4c23-b433-a2b88608ac72 X-Archives-Hash: 3256ac9374620d94a55883790fefa1e7 commit: eabdf0892f779c6f232d4ad6b40bb846072ab5c1 Author: Miroslav Šulc gentoo org> AuthorDate: Fri Dec 1 10:02:17 2023 +0000 Commit: Miroslav Šulc gentoo org> CommitDate: Fri Dec 1 10:02:29 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eabdf089 dev-java/felix-gogo-runtime: enabled tests for all java versions Signed-off-by: Miroslav Šulc gentoo.org> .../felix-gogo-runtime-1.1.6.ebuild | 17 ++++------------- ...-gogo-runtime-1.1.6-skip-tests-non-java-8.patch | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/dev-java/felix-gogo-runtime/felix-gogo-runtime-1.1.6.ebuild b/dev-java/felix-gogo-runtime/felix-gogo-runtime-1.1.6.ebuild index 2b36a365fe85..ce4df3018c1d 100644 --- a/dev-java/felix-gogo-runtime/felix-gogo-runtime-1.1.6.ebuild +++ b/dev-java/felix-gogo-runtime/felix-gogo-runtime-1.1.6.ebuild @@ -37,6 +37,8 @@ RDEPEND="${CP_DEPEND} BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-felix )" VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/felix.apache.org.asc" +PATCHES=( "${FILESDIR}/${P}-skip-tests-non-java-8.patch" ) + JAVA_SRC_DIR="src/main/java" JAVA_TEST_EXCLUDES=( #Invalid test class No runnable methods @@ -48,17 +50,6 @@ JAVA_TEST_GENTOO_CLASSPATH=" " JAVA_TEST_SRC_DIR="src/test/java" -src_test() { - local vm_version="$(java-config -g PROVIDES_VERSION)" - if ver_test "${vm_version}" -lt 11; then - java-pkg-simple_src_test - else - # There was 1 failure: - # 1) testPipe(org.apache.felix.gogo.runtime.TestParser) - # org.junit.ComparisonFailure: expected:<[def]> but was:<[]> - # at org.junit.Assert.assertEquals(Assert.java:117) - # at org.junit.Assert.assertEquals(Assert.java:146) - # at org.apache.felix.gogo.runtime.TestParser.testPipe(TestParser.java:152) - einfo "Tests would fail with Java 11 or higher" - fi +src_prepare() { + default } diff --git a/dev-java/felix-gogo-runtime/files/felix-gogo-runtime-1.1.6-skip-tests-non-java-8.patch b/dev-java/felix-gogo-runtime/files/felix-gogo-runtime-1.1.6-skip-tests-non-java-8.patch new file mode 100644 index 000000000000..270b01be759a --- /dev/null +++ b/dev-java/felix-gogo-runtime/files/felix-gogo-runtime-1.1.6-skip-tests-non-java-8.patch @@ -0,0 +1,22 @@ +skip tests that fail with java > 1.8 if java > 1.8 is used + +we compare here just that the first part of the version is 1 +which is true only for version 1.8, other versions have first number +like 11, 17, 21 and those fail the condition hence the remaining tests +are skipped +we cannot use System.version() here as this is available only since java 9 + +--- a/src/test/java/org/apache/felix/gogo/runtime/TestParser.java ++++ b/src/test/java/org/apache/felix/gogo/runtime/TestParser.java +@@ -149,9 +149,10 @@ public class TestParser extends AbstractParserTest + assertEquals("def", c.execute("echo def|grep d.*|capture")); + assertEquals("def", c.execute("echoout def|grep d.*|capture")); + assertEquals("def", c.execute("myecho def|grep d.*|capture")); +- assertEquals("def", c.execute("(echoout abc; echoout def; echoout ghi)|grep d.*|capture")); + assertEquals("", c.execute("echoout def; echoout ghi | grep d.* | capture")); + assertEquals("hello world", c.execute("echo hello world|capture")); ++ org.junit.Assume.assumeTrue("1".equals(System.getProperty("java.version").split("\\.")[0])); ++ assertEquals("def", c.execute("(echoout abc; echoout def; echoout ghi)|grep d.*|capture")); + assertEquals("defghi", c.execute("(echoout abc; echoout def; echoout ghi)|grep 'def|ghi'|capture")); + } +