without an e

continuous testing made easy [04/17/2007 22:55:03]

Most unix-style systems have a neat little utility called watch that run a command over and over again at a specified interval. It doesn't handle stderr too well, so I tend to use a dumb little bash script I call loop:


#!/bin/bash
if [[ $1 != ""]]; then
while true; do
$2; $3; $4; $5; $6; $7; $8; sleep $1;
done;
fi

Stick that on your path, open a terminal window, and then you can do thing like:

    loop 5 clear ./runtests

Now you have a window that sits there running your unit tests over and over again every 5 seconds. I know a lot of the big IDE's have this built-in, but if you're hacking around in emacs or vim, this little script can come in handy.

Post a comment:
name: (shows up on site)
link: (shows up on site)
mail: (for michal only)
no html allowed yet. sorry: