diff --git a/pom.xml b/pom.xml index 7ed1c987..cdc945db 100644 --- a/pom.xml +++ b/pom.xml @@ -73,7 +73,8 @@ this 'argLine' property instead of the definition of the 'argLine' configuration setting allows users or plugins to specify additional arguments. In particular, JaCoCo relies on this for the configuration - of its Java agent. --> + of its Java agent, and Pitest uses this configuration when it spawns + additional JVMs. --> - -Xmx1024m + -Xmx${argLine.xmx} -Djava.awt.headless=true + + 1024m diff --git a/run-mutation-tests.sh b/run-mutation-tests.sh new file mode 100755 index 00000000..66826c14 --- /dev/null +++ b/run-mutation-tests.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# Executes Pitest to determine the code base' mutation test coverage. The set +# of tests executed can optionally be restricted by name. The results are found +# in each Maven module's `target/pit-reports` directory. + +set -e -u -o pipefail + +if [ "${#}" -gt 1 ]; then + echo "Usage: ./$(basename "${0}") [TargetTests]" + exit 1 +fi + +targetTests=${1:-*} + +mvn clean test pitest:mutationCoverage \ + -DargLine.xmx=2048m \ + -Dverification.skip \ + -DfailIfNoTests=false \ + -Dtest="${targetTests}" \ + -DtargetTests="${targetTests}"