Files
mgmt/misc/looper.sh
James Shubin 62a6e0da1d misc: Add two test helpers
Hopefully these make testing and debugging easier!
2019-02-24 12:28:59 -05:00

15 lines
231 B
Bash
Executable File

#!/bin/bash
# simple test loop runner, eg: ./looper.sh make test-shell-exec-fail
while true
do
echo "running: $@"
$@ # run some command
ret=$?
if [ $ret -ne 0 ]; then
echo "failed with code: $ret"
exit $ret
fi
echo
done