mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
pkgs/build-support/cabal: add support for running specific tests only via 'testTarget'
The dns packages requires this feature, because it ships two test programs: one of them requires network access (so we cannot run it), but the other test does not. Setting testTarget appropriately allows us to run only one of the two suites.
This commit is contained in:
parent
9ac8ea937c
commit
fb83f8605f
1 changed files with 4 additions and 1 deletions
|
@ -80,6 +80,9 @@ assert enableCheckPhase -> stdenv.lib.versionOlder "7" ghc.ghcVersion;
|
|||
# build-depends Cabal fields stated in test-suite stanzas
|
||||
testDepends = [];
|
||||
|
||||
# target(s) passed to the cabal test phase as an argument
|
||||
testTarget = "";
|
||||
|
||||
# build-tools Cabal field
|
||||
buildTools = [];
|
||||
|
||||
|
@ -159,7 +162,7 @@ assert enableCheckPhase -> stdenv.lib.versionOlder "7" ghc.ghcVersion;
|
|||
checkPhase = stdenv.lib.optional self.doCheck ''
|
||||
eval "$preCheck"
|
||||
|
||||
./Setup test
|
||||
./Setup test ${self.testTarget}
|
||||
|
||||
eval "$postCheck"
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue