-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from c-dilks/coverage
feat: use `jacoco` for coverage testing
- Loading branch information
Showing
6 changed files
with
106 additions
and
26 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
# simple script to aggregate jacoco results, until we figure out a better way | ||
|
||
mkdir -p publish | ||
rm -r publish | ||
mkdir -p publish | ||
for d in $(find -type d -name 'jacoco'); do | ||
target=publish/$(echo $d | sed 's;^\./;;') | ||
mkdir -p $target | ||
cp -r $d/* $target/ | ||
done | ||
|
||
pushd publish | ||
|
||
cat << EOF > index.html | ||
<html> | ||
<head> | ||
<title>JaCoCo Coverage Summary</title> | ||
</head> | ||
<body> | ||
<h1>JaCoCo Coverage Summary</h1> | ||
<ul> | ||
EOF | ||
|
||
indexPages=$(find . -name "index.html" | grep 'jacoco/index') | ||
[ -z "$indexPages" ] && echo "ERROR: no jacoco HTML pages found" >&2 && exit 1 | ||
for indexPage in $indexPages; do | ||
link=$(echo $indexPage | sed 's;^./;;') | ||
name=$(echo $link | sed 's;/target/site/.*;;') | ||
cat << EOF >> index.html | ||
<li><a href="$link">$name</a></li> | ||
EOF | ||
done | ||
|
||
cat << EOF >> index.html | ||
</body> | ||
</html> | ||
EOF | ||
|
||
echo "===============" | ||
cat index.html | ||
echo "===============" | ||
popd |