On Tuesday 15 February 2011, Ralf Wildenhues wrote: > * Stefano Lattarini wrote on Tue, Feb 15, 2011 at 10:21:36AM CET: > > On Monday 14 February 2011, Ralf Wildenhues wrote: > > > > --- /dev/null > > > > +++ b/tests/instspc-data.test > > > > > > > +# Helper testcase which generate input data for the other test > > > > +# `instspc-*.test'. It basically delegates the work to the helper > > > > +# script `instspc-test.sh'. > > > > > > As an alternative to a helper testcase, this could also just be a helper > > > script whose run is a prerequisite to the instspc*.log files. That way > > > you don't have a bogus test result. > > > I had already tried a similar approach in the first version of the patch: > > <http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00152.html> > > but IMHO that turned out to be slightly more fragile and more complex than > > the current approach. So I'd rather not go back there. > > It is not immediately obvious why the approach was more fragile; care to > elaborate on that? Asking just out of curiosity. > Well, basically I wanted to rely on the code in `tests/defs' (in order to avoid complications and duplications), but since that code is really meant only to be run inside a testcase, it wasn't obvious whether I could safely use it in a helper script. Making that helper script a fully-fledged testcase helped with this. Also, I find it simpler to have a simple dependency:
$(instspc_tests:.test=.log): instspc-tests.sh instspc-data.log rather than a dependency + hand-written rule: $(instspc_tests:.test=.log): instspc-tests.sh instspc-data.dir/.dirstamp instspc-data.dir/.dirstamp: srcdir=$(srcdir) $(SHELL) $(srcdir)/tests/instspc-setup This are small things, agreed, and that's why I said "... *slightly* more fragile and more complex than the current approach". > Sorry for overlooking that you had already tried this. > > Cheers, > Ralf > Regards, Stefano