-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinfection.inc.bash
More file actions
47 lines (42 loc) · 1.19 KB
/
infection.inc.bash
File metadata and controls
47 lines (42 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
function runInfection(){
local extraArgs=( -- )
if [[ "1" == "$infectionOnlyCovered" && "0" ]]
then
extraArgs+=( --only-covered )
fi
if [[ "0" == "${phpunitFailedOnlyFiltered:-0}" ]]
then
# Don't run infection with xdebug
phpNoXdebug -f ./bin/infection \
"${extraArgs[@]}" \
--coverage=$varDir/phpunit_logs \
--threads=${infectionThreads} \
--configuration=${infectionConfig} \
--min-msi=${infectionMutationScoreIndicator} \
--min-covered-msi=${infectionCoveredCodeMSI}
else
${phpBinPath} -f ./bin/infection \
"${extraArgs[@]}" \
--threads=${infectionThreads} \
--configuration=${infectionConfig} \
--min-msi=${infectionMutationScoreIndicator} \
--min-covered-msi=${infectionCoveredCodeMSI}
fi
}
infectionExitCode=99
while (( infectionExitCode > 0 ))
do
backupIFS=$IFS
IFS=$standardIFS
set +e
rm -rf $varDir/infection/*
runInfection
infectionExitCode=$?
set -e
IFS=$backupIFS
if (( $infectionExitCode > 0 ))
then
tryAgainOrAbort "Infection"
fi
done