On Tue, Nov 11, 2014 at 09:10:26PM +0000, Jonathan Wiltshire wrote: > Are you sure about that? > > `which strace` causes strace to print its usage text. I think you mean > something like > > which strace >/dev/null || exit 0 Umh, yes it would be better. That was only an example, something to say that such a change is quite regression-free. But if I'm to upload it, I'd definitely use this: --- a/test_run.sh +++ b/test_run.sh @@ -9,6 +9,13 @@ # COPYING file in the root project directory for full text. # +CHECKOUT=$(which strace) +CHECKRET="$?" +if [ ! "$CHECKRET" -eq 0 ];then + echo "Could not find strace. Not running tests, but marking them as pass." + exit 0 +fi + # Get filename we want to run without path name=`echo $1 | sed 's/.*\/\(libeatmydata\/.*[^\/]*\)$/\1/'` which is less prone to errors (even such a simple code could lie an error, as you spotted out...), and it prints a useful message IFF the tests are skipped. -- regards, Mattia Rizzolo GPG Key: 4096R/B9444540 http://goo.gl/I8TMB more about me: http://mapreri.org Launchpad User: https://launchpad.net/~mapreri Ubuntu Wiki page: https://wiki.ubuntu.com/MattiaRizzolo
Attachment:
signature.asc
Description: Digital signature