-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce mutation test script for changed code
While there, optimize the existing `run-mutation-tests.sh` script.
- Loading branch information
1 parent
9c158f1
commit afadc27
Showing
3 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
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,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Executes Pitest to determine the mutation test coverage of changed code. By | ||
# default code that is changed relative to the default branch is exercised, | ||
# though another change set may be specified; see the Arcmutate Git integration | ||
# documentation for details [1]. The results are found in each Maven module's | ||
# `target/pit-reports` directory. | ||
# | ||
# [1] https://docs.arcmutate.com/docs/git-integration.html | ||
|
||
set -e -u -o pipefail | ||
|
||
if [ "${#}" -gt 1 ]; then | ||
echo "Usage: ${0} [DiffSpec]" | ||
exit 1 | ||
fi | ||
|
||
diffSpec="${1:-+GIT(from[refs/remotes/origin/HEAD])}" | ||
|
||
mvn clean test-compile pitest:mutationCoverage \ | ||
-DargLine.xmx=2048m \ | ||
-Dverification.skip \ | ||
-Dfeatures="${diffSpec}" |
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