Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update coverage report script #11242

Draft
wants to merge 2 commits into
base: branch-24.10
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions build/coverage-report
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,32 @@
#

set -e
JVER=${JACOCO_VERSION:-"0.8.5"}
JDEST=${JACOCO_DEST:-"./target/jacococli.jar"}
TMP_CLASS=${TEMP_CLASS_LOC:-"./target/jacoco_classes/"}
HTML_LOC=${HTML_LOCATION:="./target/jacoco-report/"}
XML_LOC=${XML_LOCATION:="${HTML_LOC}"}
DIST_JAR=${RAPIDS_DIST_JAR:-$(ls ./dist/target/rapids-4-spark_2.12-*cuda*.jar | grep -v test | head -1 | xargs readlink -f)}
SPK_VER=${JACOCO_SPARK_VER:-"320"}
UDF_JAR=${RAPIDS_UDF_JAR:-$(ls ./udf-compiler/target/spark${SPK_VER}/rapids-4-spark-udf_2.12-*-SNAPSHOT-spark${SPK_VER}.jar | grep -v test | head -1 | xargs readlink -f)}
SOURCE_DIRS=${SOURCE_DIRS:-"./sql-plugin/src/main/scala/:./sql-plugin/src/main/java/:./shuffle-plugin/src/main/scala/:./udf-compiler/src/main/scala/"}

SOURCE_WITH_ARGS="--sourcefiles "$(echo $SOURCE_DIRS | sed -e 's/:/ --sourcefiles /g')

TMP_CLASS=${TEMP_CLASS_LOC:-"./target/jacoco_classes/"}
# Clean up the classes so we can build the report cleanly
rm -rf "$TMP_CLASS"
mkdir -p "$TMP_CLASS"
DIST_JAR=${RAPIDS_DIST_JAR:-$(ls ./dist/target/rapids-4-spark_2.12-*cuda*.jar | grep -v test | head -1 | xargs readlink -f)}
UDF_JAR=${RAPIDS_UDF_JAR:-$(ls ./udf-compiler/target/spark${SPK_VER}/rapids-4-spark-udf_2.12-*-spark${SPK_VER}.jar | grep -v test | head -1 | xargs readlink -f)}
pushd "$TMP_CLASS"
jar xf "$DIST_JAR" com org rapids spark-shared "spark${SPK_VER}/"
# extract the .class files in udf jar and replace the existing ones in spark3xx-ommon and spark$SPK_VER
# because the class files in udf jar will be modified in aggregator's shade phase
jar xf "$UDF_JAR" com/nvidia/spark/udf
rm -rf com/nvidia/shaded/ org/openucx/ spark-shared/com/nvidia/spark/udf/ spark${SPK_VER}/com/nvidia/spark/udf/
rm -rf com/nvidia/shaded/ \
org/openucx/ spark-shared/com/nvidia/spark/udf/ \
spark${SPK_VER}/com/nvidia/spark/udf/ \
spark${SPK_VER}/META-INF/versions/*
popd


JVER=${JACOCO_VERSION:-"0.8.8"}
JDEST=${JACOCO_DEST:-"./target/jacococli.jar"}
HTML_LOC=${HTML_LOCATION:="./target/jacoco-report/"}
XML_LOC=${XML_LOCATION:="${HTML_LOC}"}
SOURCE_DIRS=${SOURCE_DIRS:-"./sql-plugin/src/main/scala/:./sql-plugin/src/main/java/:./shuffle-plugin/src/main/scala/:./udf-compiler/src/main/scala/"}
SOURCE_WITH_ARGS="--sourcefiles "$(echo $SOURCE_DIRS | sed -e 's/:/ --sourcefiles /g')

if [ ! -f "$JDEST" ]; then
# get the jacoco jar
mvn dependency:get -DgroupId=org.jacoco -DartifactId=org.jacoco.cli -Dclassifier=nodeps -Dversion="$JVER" -Ddest="$JDEST"
Expand Down
Loading