[Top][All Lists]

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

Re: Bracketing a "check" target with pre and post actions

From: Ralf Wildenhues
Subject: Re: Bracketing a "check" target with pre and post actions
Date: Mon, 21 Jul 2008 21:16:20 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

* Bernd Jendrissek wrote on Mon, Jul 21, 2008 at 01:31:46PM CEST:
> On Sun, Jul 20, 2008 at 9:32 PM, Ralf Wildenhues <address@hidden> 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.


reply via email to

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