Skip to content

Instantly share code, notes, and snippets.

@firstclown
Created May 17, 2011 12:45
Show Gist options
  • Save firstclown/976406 to your computer and use it in GitHub Desktop.
Save firstclown/976406 to your computer and use it in GitHub Desktop.
A bash-based unit test loop for Kohana based unit tests running in Linux. Runs every 25 seconds or so and pops up a message only on failure or when it switches from failure to success.
phptestloop () {
while true; do FOO=`/opt/lampp/bin/phpunit --bootstrap=modules/unittest/bootstrap.php application/tests`;
if [ $? -ne 0 ];
then
SUCCESS=0;
notify-send -i gtk-dialog-error 'Tests Failed' "$FOO" ;
else
if [ "$SUCCESS" = 0 ];
then
SUCCESS=1;
notify-send 'Tests Passed' ;
fi
fi;
sleep 25;
done; }
@firstclown
Copy link
Author

A bash-based unit test loop for Kohana based unit tests running in Linux. Runs every 25 seconds or so and pops up a message only on failure or when it switches from failure to success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment