|
From: | Jim Meyering |
Subject: | Re: Use Exit, not exit, in test suite |
Date: | Sat, 06 Sep 2008 22:00:21 +0200 |
Ralf Wildenhues <address@hidden> wrote: ... > Use `Exit' instead of `exit' in test suite. ... > +# We use a trap below for cleanup. This requires us to go through > +# hoops to get the right exit status transported through the signal. > +# So use `Exit STATUS' instead of `exit STATUS' inside of the tests. > +# Turn off errexit here so that we don't trip the bug with OSF1/Tru64 > +# sh inside this function. > +Exit () > +{ > + set +e > + (exit $1) > + exit $1 > +} Nice! I'll use the same in coreutils' bourne shell test scripts. Looks like 300 of them can use this.
[Prev in Thread] | Current Thread | [Next in Thread] |