* Bernd Jendrissek wrote on Mon, Jul 21, 2008 at 01:31:46PM CEST:
> On Sun, Jul 20, 2008 at 9:32 PM, Ralf Wildenhues <[EMAIL PROTECTED]> wrote:
> > Why not do it all in check-local?
> >
> > check-local:
> >    echo "create database foo;" |psql postgres $(dbsuperuser)
> >    psql $(dbname) $(dbuser) -f $(top_srcdir)/whatever/dump.sql
> >    echo "drop database foo;" |psql postgres $(dbsuperuser)
> 
> In the end I did that, since I'm now no longer bracketing 'make check'
> but dropping the database just before populating it again.  (It helps
> to do post-mortem analysis of test failures.)  So I didn't need
> anything to run after 'check'.  Just had to add a dependency:
> 
> check-local: check

That looks broken.  check will cause the check-am target to run
'make check-local' which may then call 'make check' again.  You
can run into an endless loop this way, and it is not parallel safe
either.  I also think that you rely on undocumented features here.

> so that the database setup would happen before the testsuite ran.

Hmm, I'm not yet sure how to fix that better.

> > Or do you have a TESTS=... testsuite, rather than the second command
> > being your testsuite?
> 
> I have both TESTS = ... and AM_INIT_AUTOMAKE(dejagnu).  If by "second
> command" you mean "psql ... dump.sql", no, that's just to populate the
> database for the program that runs as a dejagnu "tool" test.

Ah, ok.

Cheers,
Ralf


Reply via email to