Created
November 28, 2024 17:31
-
-
Save jesseleite/a6fa25153bc32a33265b549bc976a485 to your computer and use it in GitHub Desktop.
Test script to see how often phpunit receives hangup signal
This file contains hidden or 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
#!/bin/bash | |
if [ -z "$1" ]; then echo 'Please specify test file!'; exit 1; fi | |
failures=0 | |
attempts=0 | |
while true; do | |
cmd="./vendor/bin/phpunit --colors $1" | |
$cmd | |
status=$? | |
[ $status -ne 0 ] && ((failures=failures+1)) | |
((attempts=attempts+1)) | |
printf "\n" | |
echo "Number of failures/attempts: $failures/$attempts" | |
printf "\n" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment