[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] {master} tests: enable 'errexit' shell flag by default.

From: Ralf Wildenhues
Subject: Re: [PATCH] {master} tests: enable 'errexit' shell flag by default.
Date: Tue, 11 Jan 2011 21:03:45 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

Hi Stefano,

* Stefano Lattarini wrote on Tue, Jan 11, 2011 at 03:02:09AM CET:
> Finally, here is the patch that moves the setting of the `errexit'
> shell flag in the `tests/defs' script.

> Here are the steps I followed to write the patch:
>  [1] I got the list of non-generated test scripts:
>       $ tests=`grep -L '^#.* GENERATED AUTOMATICALLY' tests/*.test`
>  [2] I checked that each of those test scripts had *one only* occurence
>      of a `set -e' line, and that this line occurred immediately after
>      the inclusion the `./defs' script:
>        $ perl $tests
>      (see attachement for the script)
>  [3] I used GNU sed to remove that `set -e' line and the single following
>      blank line (if any) for each of those scripts:
>       $ sed -i '/^set -e$/{ N; /^set -e\n *$/d; s/^set -e\n//; }' $tests
>  [4] I updated files ChangeLog, tests/defs and tests/README by hand.
> The patch is attached (compressed, as it's pretty big and repetitive).
> Inline below are the most relevant hunks.

So you're saying we already use 'set -e' in every test?  Nice.

Remains only bumping copyrights.  For that, I guess since the testsuite
is going to be churned completely anyway, I suggest we just use the
update-copyright script from gnulib to update it overall and be done
with it.  Would you be willing to do this (preapproved; with


> tests: enable 'errexit' shell flag by default.
> * tests/defs: Enable `errexit' shell flag (near the end).
> Removed redundant comment about the enabling of shell traces.
> * tests/README (Writing test cases): Update, and use nicer
> formatting in a couple of places.
> * All tests: Adjusted by removing now-redundant calls to
> 'set -e'.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]