Created
September 9, 2013 14:49
-
-
Save BernardNotarianni/6496653 to your computer and use it in GitHub Desktop.
Simple and efficient automatic test runner. Scan when a source file is modified, and then run the test suite, displaying result to the console.
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 | |
function ctrl_c { | |
echo "** Trapped CTRL-C" | |
stop_server | |
exit | |
} | |
# hit ctrl-c to exit the loop | |
trap ctrl_c INT TERM EXIT | |
while true; do | |
clear | |
# execute tests | |
./vendor/bin/phpunit | |
# scan directories src/ and tests/ | |
inotifywait -qqr -e modify -e create -e move -e delete src tests --exclude "\.\#.*" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment