Skip to content

Instantly share code, notes, and snippets.

@jesseleite
Created November 28, 2024 17:31
Show Gist options
  • Save jesseleite/a6fa25153bc32a33265b549bc976a485 to your computer and use it in GitHub Desktop.
Save jesseleite/a6fa25153bc32a33265b549bc976a485 to your computer and use it in GitHub Desktop.
Test script to see how often phpunit receives hangup signal
#!/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