On Sun, Jan 11, 2015 at 01:55:44PM -0700, Andrew Fresh wrote:
> On Sat, Jan 10, 2015 at 07:20:30PM +0300, Vadim Zhukov wrote:
> > So here is an improved version, after input from landry@.
> > Patch for port-modules(5) will be in a separate letter.
> > 
> > Okay?
> 
> 
> I really like this and would love to see something similar for mariadb.
> However, I am trying it with my p5-DBIx-Class update (which is in the
> archives from quite a while ago) which has tests that require both
> "mysql" and postgres.  I'm was using the pre-test and post-test targets
> to setup and teardown the databases so I could do both.
> 
> One issue I seem to have is that if tests fail, it doesn't run the
> post-test target, so the database doesn't get stopped.  Not sure if
> there is a solution for that, but something to look for.
> 
> My main question on this, if there were a similar solution for mariadb,
> how would I use both?

The current diff has 
+.if !target(do-test)
+do-test:
+       ${MODPOSTGRESQL_TEST_TARGET}
+.endif

Id say if mariadb would have roughly the same stuff, you'd define
do-test, calling ${MODPOSTGRESQL_TEST_TARGET} and
${MODMARIADB_TEST_TARGET}..

> Also, in order to run the postgres tests, I need to
> "Set $ENV{DBICTEST_PG_DSN}, _USER and _PASS"
> and I'm not quite sure what to set those to, but I didn't have time to
> try very hard.

Look at the pgrouting patch chunk, the postgresql module itself doesnt
set users, but the user of the module can/should. In pgrouting case,
iirc, it calls createuser to create a dedicated test pgsql user.

Landry

Reply via email to