* Bernd Jendrissek wrote on Mon, Jul 14, 2008 at 02:49:46PM CEST: > I need to run my testsuite against a PostgreSQL database that I want > predictably populated with data straight from the source tree, so that > code version 17 gets tested against data version 17. How can I teach > automake to set up the database before running the testsuite, and to > clean it up afterwards?
> .PHONY: fat-check > fat-check: check > echo "drop database foo;" |psql postgres $(dbsuperuser) > > check-local: > echo "create database foo;" |psql postgres $(dbsuperuser) > psql $(dbname) $(dbuser) -f $(top_srcdir)/whatever/dump.sql 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) Or do you have a TESTS=... testsuite, rather than the second command being your testsuite? Cheers, Ralf