Re: [Nix-dev] package test set up and tear down

2015-04-14 Thread Manuel Pages
1. Application should be tested in a clean VM; 2. The tests in questions should then be refactored. When it comes to building the package, I second James Cook's opinion — tests have a bug (making assumptions about the global state), so those should be disabled till (2) happens. Or, shorter, In your

Re: [Nix-dev] package test set up and tear down

2015-04-14 Thread James Cook
On 14 April 2015 at 05:54, Tomas Hlavaty wrote: > Hi all, > > I have a nix package expression with "doCheck = true;". The tests > require a RDBMS (postgresql for now). preCheck creates postgresql roles > and database and postCheck drops the roles and database. However, if > make check fails, po

[Nix-dev] package test set up and tear down

2015-04-14 Thread Tomas Hlavaty
Hi all, I have a nix package expression with "doCheck = true;". The tests require a RDBMS (postgresql for now). preCheck creates postgresql roles and database and postCheck drops the roles and database. However, if make check fails, postCheck is not executed and the database remains polluted (a