summaryrefslogtreecommitdiff
path: root/dev-java/bsh
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/bsh')
-rw-r--r--dev-java/bsh/Manifest5
-rw-r--r--dev-java/bsh/bsh-2.0_beta6-r1.ebuild68
-rw-r--r--dev-java/bsh/bsh-2.1.1.ebuild65
-rw-r--r--dev-java/bsh/files/bsh-2.1.1-skip-tests.patch119
4 files changed, 153 insertions, 104 deletions
diff --git a/dev-java/bsh/Manifest b/dev-java/bsh/Manifest
index 61879a809424..2277379a3200 100644
--- a/dev-java/bsh/Manifest
+++ b/dev-java/bsh/Manifest
@@ -1,5 +1,4 @@
-DIST bsh-2.0b6.tar.gz 1720334 BLAKE2B 7ade7d35ac66dad8c79dd2cb541c8851b321601bc6239f4d82e6b37269fdefc5cfa5efd1198f58030bb9dcc4712b42c1ca07071f0b042a59ebdbc4168e472fb0 SHA512 3d4458153f5e2a3b30d9afd79f0fe28862effa8e490fd1649d435c03bf90b060c255949a49780afee95069da4e8e8d2e4e2c5d979908370a525b3ca9a396458c
+AUX bsh-2.1.1-skip-tests.patch 3846 BLAKE2B d7bac9ed8a31f0670e5d881b2ce3f3f55c864885b466f760b756a6296bd3e3f892f9c40c7e29fa043f662da9f3d61614fda39d3d13bd3ac922aed7d2417f8ca1 SHA512 76bf6b4eef62ced23aa2f6dd52b0478a31501895c239b0a9f48741101f66741879d9db57e6135997587e1bd4f1f9b81bcb8896818ff0aae6903f3e20db8a527c
DIST bsh-2.1.1.tar.gz 1922883 BLAKE2B d60ebfab96f81a17120733887468571dd991dce663d725d9bee2dc44146e320d36600be70a3b7f76516645030d40fcda17db70989d54e98ffdc69c91738bcaf1 SHA512 585fcb9fdc8c36063a7d4dfe9a909e68b61d611f023731c955b7ced3f894cb6c48b0d463735e6825cb6f0181ba97902279212d285e325267aa533490e0bbfe00
-EBUILD bsh-2.0_beta6-r1.ebuild 1363 BLAKE2B cc838347fd0951d3e5fc26e473d6fb1febea04080bb85f30aee9bb33bc48f4e1784d55f73e81e47dc726ae4b200ef4c997765c96e9c062b9835effec40d0b310 SHA512 6ec85dc3b5cfe11e32821ed5f62cf63f06a9adf88978140c21846b5659d89bb3767e0e5e47d8cafd26d448a69f3865fc8548dff49740a3049bc72820b8d50695
-EBUILD bsh-2.1.1.ebuild 3289 BLAKE2B 081b481006a20cd1f746143d5ed2e4be46dffcc2c5d860161a5bc3f3d348a61201d47f4cb741a734decebeeba6b517c34c9d060c4981fcdde57b7b3a71f560f9 SHA512 bf6005ac031f1efc854a7eb4d16481e066b66c35ec605554facf14a96b034bf248ac83d2d9bdc9f59c290593e2fabb11366bfd22c1caa322e5290f5ffc1c0a32
+EBUILD bsh-2.1.1.ebuild 3298 BLAKE2B b8b3d109916a832067b106b7961bb1ffe544669502739a53729374d1e1982644de746b505af2791e4f15bc2a5fbadd47d1516ca2dea409a599c5d0d311c64da6 SHA512 f4ac8b7c7276af84e8f3a38bf2c7395016a14b7ee244bf4f3bee82cbca66c4ea73bc5d7bba55682736069f86371ce8900a7b255eb9f16afd10973095419546c9
MISC metadata.xml 331 BLAKE2B faccf5565dc11dfae5b8874e970f2d055f49319264c1c2d11a685659cd5c0dacbd2f915c8e45d376e8b210dac6221e172909f62be63030e4e257157feface3bb SHA512 bce4790cca3f4c4c883c1befc7d2dcabb1456dd88fef57cd2ffb25f45f9505f921a428c830d17c0ca92f876d921d56684bf7bce3bbe277c33ddd19fb03118381
diff --git a/dev-java/bsh/bsh-2.0_beta6-r1.ebuild b/dev-java/bsh/bsh-2.0_beta6-r1.ebuild
deleted file mode 100644
index ead3b203a195..000000000000
--- a/dev-java/bsh/bsh-2.0_beta6-r1.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-JAVA_PKG_IUSE="doc source test"
-MAVEN_ID="org.apache-extras.beanshell:bsh:2.0b6"
-
-inherit java-pkg-2 java-ant-2
-
-MY_PN="beanshell"
-MY_BETA="b6"
-MY_PV="${PV%%_*}"
-MY_P="${PN}-${MY_PV}${MY_BETA}"
-
-DESCRIPTION="A small embeddable Java source interpreter"
-HOMEPAGE="https://github.com/beanshell/beanshell"
-SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/${MY_PV}${MY_BETA}.tar.gz -> ${MY_P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~x86-linux"
-IUSE=""
-
-CDEPEND="
- dev-java/bsf:2.3
- java-virtuals/servlet-api:3.0
-"
-
-RDEPEND="
- ${CDEPEND}
- >=virtual/jre-1.8"
-
-DEPEND="
- ${CDEPEND}
- test? ( dev-java/ant-junit:0 )
- source? ( app-arch/zip )
- virtual/jdk:1.8"
-
-S="${WORKDIR}/${MY_PN}-${MY_PV}${MY_BETA}"
-
-JAVA_ANT_REWRITE_CLASSPATH="yes"
-EANT_BUILD_TARGET="jarall"
-EANT_DOC_TARGET="javadoc"
-EANT_GENTOO_CLASSPATH="
- bsf-2.3
- servlet-api-3.0
-"
-
-java_prepare() {
- java-pkg_clean
-}
-
-EANT_TEST_TARGET="test"
-
-src_test() {
- java-pkg-2_src_test
-}
-
-src_install() {
- java-pkg_newjar "dist/${MY_P}.jar" "${PN}.jar"
-
- java-pkg_dolauncher "${PN}-console" --main bsh.Console
- java-pkg_dolauncher "${PN}-interpreter" --main bsh.Interpreter
-
- use doc && java-pkg_dojavadoc javadoc
- use source && java-pkg_dosrc src/bsh
-}
diff --git a/dev-java/bsh/bsh-2.1.1.ebuild b/dev-java/bsh/bsh-2.1.1.ebuild
index cf6c415a2b30..bfa3513a8e0a 100644
--- a/dev-java/bsh/bsh-2.1.1.ebuild
+++ b/dev-java/bsh/bsh-2.1.1.ebuild
@@ -40,29 +40,24 @@ DOCS=(
README.md
)
+PATCHES=( "${FILESDIR}/bsh-2.1.1-skip-tests.patch" )
+
JAVA_LAUNCHER_FILENAME="bsh-console"
JAVA_MAIN_CLASS="bsh.Console"
JAVA_RESOURCE_DIRS="resources/src"
JAVA_SRC_DIR=( src bsf/src engine/src )
-JAVA_TEST_EXCLUDES=(
- bsh.TestUtil # invalid test class
- bsh.TestFilter # invalid test class
- bsh.Class3_Test
- bsh.Class13Test
- bsh.Issue_7_Test
- bsh.Issue_8_Test
- bsh.OldScriptsTest # ?? As the name says Old...
-)
JAVA_TEST_GENTOO_CLASSPATH="junit-4"
-JAVA_TEST_SRC_DIR="tests/junitTests/src"
+JAVA_TEST_SRC_DIR="tests"
src_prepare() {
+ default
java-pkg-2_src_prepare
- java-pkg_clean
+ java-pkg_clean ! -path "./tests/test-scripts/*"
# These classes are not in upstream jar file
- rm engine/src/bsh/TestBshScriptEngine.java || die
- rm src/bsh/JThis.java || die
+ mkdir -p tests/src/bsh/engine || die
+ mv {engine,tests}/src/bsh/TestBshScriptEngine.java || die
+ mv {,tests/}src/bsh/JThis.java || die
# java-pkg-simple.eclass wants resources in JAVA_RESOURCE_DIRS
mkdir resources || die
@@ -78,26 +73,6 @@ src_prepare() {
! -name 'CodeMap.html' \
! -name 'Manifest.*' \
| xargs cp --parent -t resources || die
-
- # Some but not all tests in these test classes fail
- sed \
- -e '/import org.junit.Test/a import org.junit.Ignore;' \
- -e '/diamond_operator()/i @Ignore' \
- -e '/try_with_resource()/i @Ignore' \
- -e '/integer_literal_enhancements()/i @Ignore' \
- -i tests/junitTests/src/bsh/Project_Coin_Test.java || die
-
- sed \
- -e '/import org.junit.Test/a import org.junit.Ignore;' \
- -e '/parsing_very_large_hex_literal()/i @Ignore' \
- -e '/integer_literal_enhancements_binary()/i @Ignore' \
- -e '/parsing_large_hex_literal()/i @Ignore' \
- -i tests/junitTests/src/bsh/NumberLiteralTest.java || die
-
- sed \
- -e '/import org.junit.Test/a import org.junit.Ignore;' \
- -e '/define_interface_with_constants()/i @Ignore' \
- -i tests/junitTests/src/bsh/ClassGeneratorTest.java || die
}
src_test() {
@@ -106,11 +81,35 @@ src_test() {
# ^
# symbol: class BshScriptEngineFactory
# location: class Issue_55_Test
+# cp {engine,tests}/src/bsh/engine/BshScriptEngineFactory.java || die
rm tests/junitTests/src/bsh/Issue_55_Test.java || die
+
+ # We add 3 test classes which are not covered by the default test selection of java-pkg-simple
+ # We skip "OldScriptsTest" and 4 failing test classes.
+ # Test failures are documeted in bug #903519.
+ pushd tests/junitTests/src > /dev/null || die
+ local JAVA_TEST_RUN_ONLY=$(find * \
+ -type f \
+ ! -name 'OldScriptsTest.java' \
+ ! -name 'Class3_Test.java' \
+ ! -name 'Class13Test.java' \
+ ! -name 'Issue_7_Test.java' \
+ ! -name 'Issue_8_Test.java' \
+ \( \
+ -name "*Test.java" \
+ -o -name "AnnotationsParsing.java" \
+ -o -name "GoogleReports.java" \
+ -o -name "Namespace_chaining.java" \
+ \) )
+ JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}"
+ JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}"
+ popd > /dev/null || die
+
java-pkg-simple_src_test
}
src_install() {
java-pkg-simple_src_install
+ # The eclass installs only then main launcher.
java-pkg_dolauncher "${PN}-interpreter" --main bsh.Interpreter
}
diff --git a/dev-java/bsh/files/bsh-2.1.1-skip-tests.patch b/dev-java/bsh/files/bsh-2.1.1-skip-tests.patch
new file mode 100644
index 000000000000..23c68e041fad
--- /dev/null
+++ b/dev-java/bsh/files/bsh-2.1.1-skip-tests.patch
@@ -0,0 +1,119 @@
+Test failures are documeted in https://bugs.gentoo.org/903519
+--- a/tests/junitTests/src/bsh/Project_Coin_Test.java
++++ b/tests/junitTests/src/bsh/Project_Coin_Test.java
+@@ -26,6 +26,7 @@
+ package bsh;
+
+ import org.junit.Test;
++import org.junit.Ignore;
+ import org.junit.experimental.categories.Category;
+ import org.junit.runner.RunWith;
+
+@@ -48,6 +49,7 @@ public class Project_Coin_Test {
+
+ @Test
+ @Category(ProjectCoinFeature.class)
++ @Ignore
+ public void integer_literal_enhancements() throws Exception {
+ final Interpreter interpreter = new Interpreter();
+ assertEquals("0x99", 153, interpreter.eval("return 0x99;"));
+@@ -61,6 +63,7 @@ public class Project_Coin_Test {
+
+ @Test
+ @Category(ProjectCoinFeature.class)
++ @Ignore
+ public void diamond_operator() throws Exception {
+ eval("List<String> list = new ArrayList<>()");
+ final Object anagrams = eval(
+@@ -98,6 +101,7 @@ public class Project_Coin_Test {
+
+ @Test
+ @Category(Project_Coin_Test.class)
++ @Ignore
+ public void try_with_resource() throws Exception {
+ final Interpreter interpreter = new Interpreter();
+ final AtomicBoolean closed = new AtomicBoolean(false);
+--- a/tests/junitTests/src/bsh/NumberLiteralTest.java
++++ b/tests/junitTests/src/bsh/NumberLiteralTest.java
+@@ -1,6 +1,7 @@
+ package bsh;
+
+ import org.junit.Test;
++import org.junit.Ignore;
+ import org.junit.runner.RunWith;
+
+ import static bsh.TestUtil.eval;
+@@ -22,6 +23,7 @@ public class NumberLiteralTest {
+ }
+
+ @Test
++ @Ignore
+ public void integer_literal_enhancements_binary() throws Exception {
+ assertEquals("0b10011001", 153, eval("return 0b10011001;"));
+ }
+@@ -49,11 +51,13 @@ public class NumberLiteralTest {
+ }
+
+ @Test
++ @Ignore
+ public void parsing_large_hex_literal() throws Exception {
+ assertEquals(0xff000000L, eval("return 0xff000000;"));
+ }
+
+ @Test
++ @Ignore
+ public void parsing_very_large_hex_literal() throws Exception {
+ assertEquals(new BigInteger("ff00000000000000", 16), eval("return 0xff00000000000000;"));
+ }
+--- a/tests/junitTests/src/bsh/ClassGeneratorTest.java
++++ b/tests/junitTests/src/bsh/ClassGeneratorTest.java
+@@ -27,6 +27,7 @@ package bsh;
+
+ import org.junit.Assert;
+ import org.junit.Test;
++import org.junit.Ignore;
+ import org.junit.experimental.categories.Category;
+ import org.junit.runner.RunWith;
+
+@@ -86,6 +87,7 @@ public class ClassGeneratorTest {
+ */
+ @Test
+ @Category(KnownIssue.class)
++ @Ignore
+ public void define_interface_with_constants() throws Exception {
+ // these three are treated equal in java
+ TestUtil.eval("interface Test { public static final int x = 1; }");
+--- a/tests/junitTests/src/bsh/GoogleReports.java
++++ b/tests/junitTests/src/bsh/GoogleReports.java
+@@ -26,6 +26,7 @@
+ package bsh;
+
+ import org.junit.Test;
++import org.junit.Ignore;
+ import org.junit.runner.RunWith;
+
+ import javax.script.ScriptEngine;
+@@ -69,6 +70,7 @@ public class GoogleReports {
+ * <a href="http://code.google.com/p/beanshell2/issues/detail?id=6">issue#60</a>
+ */
+ @Test
++ @Ignore
+ public void accessibility_issue_a() throws Exception {
+ final Interpreter interpreter = new Interpreter();
+ interpreter.set("x", this);
+@@ -83,6 +85,7 @@ public class GoogleReports {
+ * <a href="http://code.google.com/p/beanshell2/issues/detail?id=6">issue#60</a>
+ */
+ @Test
++ @Ignore
+ public void accessibility_issue_b() throws Exception {
+ final Interpreter interpreter = new Interpreter();
+ interpreter.set("x", this);
+@@ -96,6 +99,7 @@ public class GoogleReports {
+ * <a href="http://code.google.com/p/beanshell2/issues/detail?id=10">issue#10</a>
+ */
+ @Test(expected = ParseException.class)
++ @Ignore
+ public void parse_error() throws Exception {
+ eval("\1;");
+ }