11 янв. 2015 г. 23:55 пользователь "Andrew Fresh" <[email protected]>
написал:
>
> 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.
That's planned for time when postresql.port.mk goes in. :)
> 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.
post-test isn't suitable for that, yes. Look how postgresql.port.mk does
shell commands concatenation.
> My main question on this, if there were a similar solution for mariadb,
> how would I use both?
Add both to MODULES, and specify do-test manually, calling
${MODFOO_do-test} for each module.
> 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.
TEST_ENV?
--
Vadim Zhukov