File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 3636# phpunitFailedOnlyFiltered=1
3737# fi
3838# fi
39- noCoverage =(" " )
39+ extraConfigs =(" " )
4040 if [[ " 1" != " $phpUnitCoverage " ]]
4141 then
42- noCoverage+=( --no-coverage )
42+ extraConfigs+=( --no-coverage )
43+ fi
44+ if [[ " 1" == " $phpUnitIterativeMode " ]]
45+ then
46+ echo
47+ echo " Uniterate Mode - Iterative Testing with Fast Failure"
48+ echo " ----------------------------------------------------"
49+ echo
50+ extraConfigs+=( --order-by=depends,defects )
51+ extraConfigs+=( --stop-on-failure --stop-on-error --stop-on-defect --stop-on-warning )
4352 fi
4453 set +e
4554 set -x
4857 ${paratestConfig[@]} \
4958 -c ${phpUnitConfigPath} \
5059 ${rerunFilter[@]} \
51- ${noCoverage [@]} \
60+ ${extraConfigs [@]} \
5261 --enforce-time-limit \
5362 --fail-on-risky \
5463 --fail-on-warning \
Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ phpcsFailOnWarning=0
3636
3737# #PHPUnit Configs
3838
39+ # Iterative Mode - prioritises runnign failed tests and stops on first error
40+ phpUnitIterativeMode=${phpUnitIterativeMode:- 0}
41+
3942# PHPUnit Quick Tests - optional skip slow tests
4043phpUnitQuickTests=${phpUnitQuickTests:- 0}
4144
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ function usage {
2828 echo " stan|phpstan phpstan"
2929 echo " ann|phpunitAnnotations phpunitAnnotations"
3030 echo " unit|phpunit phpunit"
31+ echo " uniterate phpunit iterative mode - prioritise broken tests and fail on error"
3132 echo " infect|infection infection"
3233 echo " md|messdetector php mess detector"
3334 echo " ml|markdown markdown validation"
6364 stan | phpstan ) singleToolToRun=" phpstan" ;;
6465 ann | phpunitAnnotations ) singleToolToRun=" phpunitAnnotations" ;;
6566 unit | phpunit ) singleToolToRun=" phpunit" ;;
67+ uniterate ) singleToolToRun=" phpunit" ; phpUnitIterativeMode=1;;
6668 infect | infection ) singleToolToRun=" infection" ;;
6769 md | messdetector ) singleToolToRun=" messDetector" ;;
6870 ml | markdown ) singleToolToRun=" markdownLinks" ;;
You can’t perform that action at this time.
0 commit comments