[Nix-dev] Using a real test-runner for "Nix" tests?

Christian Theune ct at flyingcircus.io
Mon Jan 4 15:50:55 CET 2016


Hi,

I hacked a little bit on Nix itself a while ago and I was having a hard time interacting with the test runner.

Is there interest in a contribution to get a “real” test runner with capabilities? I experimented a bit and managed to get
the tests running with a simplish plugin for “pytest” which is my preferred test runner.

The good things that would come out of that would be:

* structured output
* not having to manually register tests
* selective runs of individual tests (by name, only ones that failed recently, …)
* maybe move towards a more structured approach of managing shared setups
* syntax check the test scripts explicitly

My initial setup was pretty simple:

* adding the existing “pytest” package as a build dependency
* building a basic plugin for “non-python” support (this needs some polishing and I’d be happy to)
* renaming the test files to get picked up by the default discovery

The output for a good run now looks like this (not running all tests as I’m still fixing some):



So - specifically asking Eelco here - am I stepping on someones toes here? Is this interesting to you? Annoying?

I’d be happy to polish this and provide a pull request.

Cheers,
Christian

PS: make installcheck still works with this.

--
Christian Theune · ct at flyingcircus.io · +49 345 219401 0
Flying Circus Internet Operations GmbH · http://flyingcircus.io
Forsterstraße 29 · 06112 Halle (Saale) · Deutschland
HR Stendal HRB 21169 · Geschäftsführer: Christian. Theune, Christian. Zagrodnick

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160104/52a97034/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2016-01-04 at 15.48.38.png
Type: image/png
Size: 34263 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160104/52a97034/attachment-0001.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160104/52a97034/attachment-0001.bin 


More information about the nix-dev mailing list