Skip to content

Commit

Permalink
java-pkg-simple.eclass: improve description of "generated-test"
Browse files Browse the repository at this point in the history
Signed-off-by: Volkmar W. Pogatzki <[email protected]>
Closes: gentoo#33389
Signed-off-by: Miroslav Šulc <[email protected]>
  • Loading branch information
vaukai authored and fordfrog committed Oct 19, 2023
1 parent 834d553 commit 0912295
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions eclass/java-pkg-simple.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,10 @@ java-pkg-simple_src_install() {
# @FUNCTION: java-pkg-simple_src_test
# @DESCRIPTION:
# src_test for simple single java jar file.
# It will perform test with frameworks that are defined in
# ${JAVA_TESTING_FRAMEWORKS}.
# It will compile test classes from test sources using ejavac and perform tests
# with frameworks that are defined in ${JAVA_TESTING_FRAMEWORKS}.
# test-classes compiled with alternative compilers like groovyc need to be placed
# in the "generated-test" directory.
java-pkg-simple_src_test() {
local test_sources=test_sources.lst classes=target/test-classes moduleinfo
local tests_to_run classpath
Expand All @@ -502,12 +504,13 @@ java-pkg-simple_src_test() {
fi

# https://bugs.gentoo.org/906311
# This will remove target/test-classes. Do not put any test-classes there manually.
rm -rf ${classes} || die

# create the target directory
mkdir -p ${classes} || die "Could not create target directory for testing"

# generated test classes should get generated into "generated-test" directory
# generated test classes should get compiled into "generated-test" directory
if [[ -d generated-test ]]; then
cp -r generated-test/* "${classes}" || die "cannot copy generated test classes"
fi
Expand Down

0 comments on commit 0912295

Please sign in to comment.