commit:     dcc9a94d7c88352328c9c238c352c0680b88467d
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 11 14:19:47 2021 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Thu Nov 11 14:19:57 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcc9a94d

dev-java/bcprov: fixed out of memory during tests in 1.69

Bug: https://bugs.gentoo.org/823065
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 dev-java/bcprov/bcprov-1.69.ebuild | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/dev-java/bcprov/bcprov-1.69.ebuild 
b/dev-java/bcprov/bcprov-1.69.ebuild
index 7849fe08b47..81cc3229bc0 100644
--- a/dev-java/bcprov/bcprov-1.69.ebuild
+++ b/dev-java/bcprov/bcprov-1.69.ebuild
@@ -7,7 +7,7 @@ JAVA_PKG_IUSE="doc source test"
 MAVEN_ID="org.bouncycastle:bcprov-jdk15on:1.69"
 JAVA_TESTING_FRAMEWORKS="junit-4"
 
-inherit java-pkg-2 java-pkg-simple
+inherit java-pkg-2 java-pkg-simple check-reqs
 
 DESCRIPTION="Java cryptography APIs"
 HOMEPAGE="https://www.bouncycastle.org/java.html";
@@ -55,12 +55,33 @@ JAVA_TEST_RUN_ONLY=(
        "org.bouncycastle.util.encoders.test.AllTests"  # OK (15 tests)
 )
 
+check_env() {
+       if use test; then
+               # this is needed only for tests
+               CHECKREQS_MEMORY="1200M"
+               check-reqs_pkg_pretend
+       fi
+}
+
+pkg_pretend() {
+       check_env
+}
+
+pkg_setup() {
+       check_env
+}
+
 src_prepare() {
        default
        cd ../ || die
        java-pkg_clean
 }
 
+src_test() {
+       JAVA_TEST_EXTRA_ARGS+=" -Xmx${CHECKREQS_MEMORY}"
+       java-pkg-simple_src_test
+}
+
 src_install() {
        default
        einstalldocs

Reply via email to