-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinfection.inc.bash
More file actions
executable file
·52 lines (46 loc) · 1.38 KB
/
infection.inc.bash
File metadata and controls
executable file
·52 lines (46 loc) · 1.38 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
47
48
49
50
51
#!/usr/bin/env bash
function runInfection(){
# Use PHAR from vendor-phar directory instead of composer binary
local infectionPath="$pharDir/infection.phar"
local extraArgs=( -- )
if [[ "1" == "$infectionOnlyCovered" && "0" ]]
then
extraArgs+=( --only-covered )
fi
if [[ "0" == "${phpunitFailedOnlyFiltered:-0}" ]]
then
# Don't run infection with xdebug
phpNoXdebug -f "$infectionPath" \
"${extraArgs[@]}" \
--coverage=$varDir/phpunit_logs \
--threads=${infectionThreads} \
--configuration=${infectionConfig} \
--min-msi=${infectionMutationScoreIndicator} \
--min-covered-msi=${infectionCoveredCodeMSI} \
--log-verbosity=all
else
${phpBinPath} -f "$infectionPath" \
"${extraArgs[@]}" \
--threads=${infectionThreads} \
--configuration=${infectionConfig} \
--min-msi=${infectionMutationScoreIndicator} \
--min-covered-msi=${infectionCoveredCodeMSI} \
--log-verbosity=all
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