summaryrefslogtreecommitdiff
path: root/dev-java/stringtemplate
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-02-27 13:38:07 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-02-27 13:38:07 +0000
commit8dfbbf9dcd52fab20bf703331d91809ae5b7b113 (patch)
treeabc7e3b0391e53df57053276dd929ba4c2532c1e /dev-java/stringtemplate
parent76d131064c31cfcb51214f29f803a6db111ae0b8 (diff)
downloadbaldeagleos-repo-8dfbbf9dcd52fab20bf703331d91809ae5b7b113.tar.gz
baldeagleos-repo-8dfbbf9dcd52fab20bf703331d91809ae5b7b113.tar.xz
baldeagleos-repo-8dfbbf9dcd52fab20bf703331d91809ae5b7b113.zip
Adding metadata
Diffstat (limited to 'dev-java/stringtemplate')
-rw-r--r--dev-java/stringtemplate/stringtemplate-4.3.1.ebuild23
1 files changed, 23 insertions, 0 deletions
diff --git a/dev-java/stringtemplate/stringtemplate-4.3.1.ebuild b/dev-java/stringtemplate/stringtemplate-4.3.1.ebuild
index 27b01afa316f..ed368f6c2c6d 100644
--- a/dev-java/stringtemplate/stringtemplate-4.3.1.ebuild
+++ b/dev-java/stringtemplate/stringtemplate-4.3.1.ebuild
@@ -68,6 +68,29 @@ src_prepare() {
rm -v "${JAVA_TEST_SRC_DIR}/org/stringtemplate/v4/test/TestEarlyEvaluation.java" || die
}
+src_test() {
+ # Make sure no older versions of this slot are present in the classpath
+ # https://bugs.gentoo.org/834138#c4
+ local old_ver_cp="$(nonfatal java-pkg_getjars "${PN}-${SLOT}")"
+ local new_test_cp="$(\
+ java-pkg_getjars --with-dependencies "${JAVA_TEST_GENTOO_CLASSPATH}")"
+ new_test_cp="${new_test_cp//"${old_ver_cp}"/}"
+
+ # Some of the test cases require an absolute path to the JAR being tested
+ # against to be in the classpath, due to the fact that they call the 'java'
+ # command outside ${S} and reuse the classpath for the tests:
+ # https://github.com/antlr/stringtemplate4/blob/4.3.1/test/org/stringtemplate/v4/test/TestImports.java#L103
+ # https://github.com/antlr/stringtemplate4/blob/4.3.1/test/org/stringtemplate/v4/test/BaseTest.java#L174
+ new_test_cp="${S}/${JAVA_JAR_FILENAME}:${new_test_cp}"
+
+ # Use JAVA_GENTOO_CLASSPATH_EXTRA to set test classpath
+ local JAVA_TEST_GENTOO_CLASSPATH=""
+ [[ -n "${JAVA_GENTOO_CLASSPATH_EXTRA}" ]] &&
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":"
+ JAVA_GENTOO_CLASSPATH_EXTRA+="${new_test_cp}"
+ java-pkg-simple_src_test
+}
+
src_install() {
java-pkg-simple_src_install
einstalldocs # https://bugs.gentoo.org/789582