From fb83f8605f3d8a6449fccd53759023f58627fe3b Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 26 Aug 2013 12:39:33 +0200 Subject: [PATCH] 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. --- pkgs/build-support/cabal/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/cabal/default.nix b/pkgs/build-support/cabal/default.nix index d57afb7bf9d8..e8161e2e818f 100644 --- a/pkgs/build-support/cabal/default.nix +++ b/pkgs/build-support/cabal/default.nix @@ -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" '';