Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
externl committed Dec 11, 2024
1 parent 52e22dc commit ef1545a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/generate-java-code-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ if [ "$(basename "$(pwd)")" != "java" ]; then
exit 1
fi

# make -C ../cpp srcs
# make
make -C ../cpp srcs
make

if [ ! -f org.jacoco.cli-nodeps.jar ]; then
wget https://repo1.maven.org/maven2/org/jacoco/org.jacoco.cli/$JACOCO_VERSION/org.jacoco.cli-$JACOCO_VERSION-nodeps.jar -O org.jacoco.cli-nodeps.jar
Expand All @@ -20,14 +20,15 @@ fi

python3 allTests.py --all --workers=4 --debug --jacoco $(pwd)/org.jacoco.agent-runtime.jar

# We don't want any coverage for IceGridGUI
find src/IceGridGUI -name '*.java' -exec rm {} \;

# We don't want any coverage for generated code. We remove their class files and any inner classes.
jacocoArgs=()
for dir in src/*; do
# Skip non-directories.
[ -d "$dir" ] || continue

# Skip IceGridGUI
[ "$(basename "$dir")" == "IceGridGUI" ] && continue

jacocoArgs+=(--classfiles "$dir/build/classes/java/main")
jacocoArgs+=(--sourcefiles "$dir/src/main/java")

Expand Down

0 comments on commit ef1545a

Please sign in to comment.