Skip to content

Commit 1a8db15

Browse files
committed
Update script
1 parent 7652fbe commit 1a8db15

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

test/small_world/scripts/generate_coverage.sh

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,20 @@
33
set -e
44

55
OPEN_REPORT=false
6-
CREATE_ARCHIVE=false
76

87
for arg in "$@"; do
98
case $arg in
109
--open)
1110
OPEN_REPORT=true
1211
;;
13-
--archive)
14-
CREATE_ARCHIVE=true
15-
;;
1612
esac
1713
done
1814

1915
echo "Generating coverage report..."
2016

2117
if [[ "$OSTYPE" == "darwin"* ]]; then
2218
echo "Detected macOS - using coverage configuration for Mac"
19+
export JAVA_HOME=$(brew --prefix)/opt/openjdk/libexec/openjdk.jdk/Contents/Home
2320
bazel coverage --config=cov_mac //...
2421
else
2522
echo "Running coverage for non-Mac platform"
@@ -32,16 +29,14 @@ bazel run @lcov//:genhtml -- \
3229
--source-directory="$(pwd)" \
3330
--branch-coverage \
3431
--ignore-errors inconsistent,gcov,unsupported,format,category,count,unused \
32+
--no-function-coverage \
33+
--flat \
34+
--legend \
35+
--quiet \
3536
"$(bazel info output_path)/_coverage/_coverage_report.dat"
3637

3738
echo "Coverage report generated in cov_html/"
3839

39-
if [[ "$CREATE_ARCHIVE" == true ]]; then
40-
echo "Creating archive cov_html.tar.gz..."
41-
tar -czf cov_html.tar.gz cov_html
42-
echo "Archive created: cov_html.tar.gz"
43-
fi
44-
4540
if [[ "$OPEN_REPORT" == true ]]; then
4641
if [[ "$OSTYPE" == "darwin"* ]]; then
4742
echo "Opening coverage report in default browser..."
@@ -52,4 +47,4 @@ if [[ "$OPEN_REPORT" == true ]]; then
5247
else
5348
echo "Coverage report available at: $(pwd)/cov_html/index.html"
5449
fi
55-
fi
50+
fi

0 commit comments

Comments
 (0)