* Stefano Lattarini wrote on Sat, Jan 15, 2011 at 12:07:45PM CET: > On Saturday 15 January 2011, Ralf Wildenhues wrote: > > I'm seeing a couple of weird issues on MinGW/MSYS. > > First of all, several spurious failures of this kind: > > > > ./defs: line 33: /bin/sed: Resource temporarily unavailable
> > @@ -31,6 +32,7 @@ test -f ./defs-static || { > > > > # The name of the current test (without the `.test' suffix.) > > me=`echo "$argv0" | sed -e 's,.*[\\/],,;s/\.test$//'` > > +test -n "$me" || exit 99 > > > A agree with your change, but I'd definitely add a comment (extracted > from your explanations above) and an error message. > > Personally, I'd go for something like this: > > me=`echo "$argv0" | sed -e 's,.*[\\/],,;s/\.test$//'` \ > && test -n "$me" \ > || { echo "$argv0: failed to define \$me" >&2; exit 99; } Like this? Thanks, Ralf 2011-01-15 Ralf Wildenhues <ralf.wildenh...@gmx.de> Stefano Lattarini <stefano.lattar...@gmail.com> tests: explain MSYS setup failure issue, improve test. * tests/defs: Add comment and failure message, improve fail logic. diff --git a/tests/defs b/tests/defs index 0f84d0a..b357df6 100644 --- a/tests/defs +++ b/tests/defs @@ -31,8 +31,10 @@ test -f ./defs-static || { . ./defs-static || exit 99 # The name of the current test (without the `.test' suffix.) -me=`echo "$argv0" | sed -e 's,.*[\\/],,;s/\.test$//'` -test -n "$me" || exit 99 +# Guard against failure to spawn sed (seen on MSYS), or empty $argv0. +me=`echo "$argv0" | sed -e 's,.*[\\/],,;s/\.test$//'` \ + && test -n "$me" \ + || { echo "$argv0: failed to define \$me" >&2; exit 99; } ## ---------------------------------------- ##