* Stefano Lattarini wrote on Mon, Apr 18, 2011 at 12:33:25AM CEST: > Subject: [PATCH] test defs: don't allow `$me' to be overridden from the > environment > > * tests/defs.in ($me): Use the namespace-safe `$am_test_name' (if > it's nonempty) as the default for the initialization of `$me', so > that a (not unlikely) environment variable `me' won't wreak havoc > in the testsuite.
This is better, but still lacking an explanation for the question I asked earlier. OK with that, and below. > --- a/tests/defs.in > +++ b/tests/defs.in > @@ -65,10 +65,13 @@ test -f "$srcdir/defs.in" || { > } > > # The name of the current test (without the `.test' suffix). > -# Test scripts can override it if they need to (but this should > -# be done carefully, and *before* including ./defs). > -if test -z "$me"; then > +# Test scripts can override it if they need to, through the use of > +# the namespace-safe variable `$am_test_name' (but this should be > +# done carefully, and *before* including ./defs). The comment change is redundant with the code change. > +if test -z "$am_test_name"; then > me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'` > +else > + me=$am_test_name > fi How about reordering so it reads nicely? I.e., if test -n "$am_test_name"; then me=$am_test_name else ... Thanks, Ralf