Mic92 / nixpkgs-review

Review pull-requests on https://github.com/NixOS/nixpkgs
MIT License
409 stars 66 forks source link

Add flag to build package `passthru.tests` #397

Open B4dM4n opened 7 months ago

B4dM4n commented 7 months ago

This PR adds a --tests flag to build passthru.tests for all packages, as discussed in #77.

The tests to be build can be filtered with -p, -P and similar, like all other packages.

$ nixpkgs-review pr --tests 303033
...
Link to currently reviewing PR:
https://github.com/NixOS/nixpkgs/pull/303033

1 tests built:
netbird.passthru.tests.netbird

2 packages built:
netbird netbird-ui
...
$ nixpkgs-review pr --tests --package-regex 'netbird.+' 303033
...
1 tests built:
netbird.passthru.tests.netbird

1 package built:
netbird-ui
...

Since they are classified as tests, they can also be enabled individually with -p, without specifying --tests:

$ nixpkgs-review pr -p netbird.passthru.tests.netbird 303033
...
1 tests built:
netbird.passthru.tests.netbird
...

Fixes: #77