commit: 46a0d7d3899ca90d1fc9a81a288d915ccdc3ebf8
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Mon May 15 09:55:47 2023 +0000
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Wed Sep 27 06:57:55 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46a0d7d3
java-pkg-simple.eclass: improve test selection for multi-jar packages
There was a problem with multi-jar packages cumulating tests. Test
classes were repeatedly run for all subsequent test runs.
With this patch we ensure that classes=target/test-classes is really
empty before compilation.
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
eclass/java-pkg-simple.eclass | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/eclass/java-pkg-simple.eclass b/eclass/java-pkg-simple.eclass
index 555d956d93d8..e50344c32acb 100644
--- a/eclass/java-pkg-simple.eclass
+++ b/eclass/java-pkg-simple.eclass
@@ -501,6 +501,9 @@ java-pkg-simple_src_test() {
return
fi
+ # https://bugs.gentoo.org/906311
+ rm -rf ${classes} || die
+
# create the target directory
mkdir -p ${classes} || die "Could not create target directory for
testing"
@@ -519,7 +522,6 @@ java-pkg-simple_src_test() {
find "${JAVA_TEST_SRC_DIR[@]}" -name \*.java > ${test_sources}
fi
-
# compile
if [[ -s ${test_sources} ]]; then
if [[ -n ${moduleinfo} ]] || [[ java-pkg_get-target -lt 9 ]];
then