Skip to content

Commit 58341dd

Browse files
committed
Explicitly list testTargets
`testTarget` is a space separated list of test-suites. We explicitly list all test suites. This allows us to implement logic in the nixpkgs builder to run test suites in separate passthru.test derivations.
1 parent 89857ea commit 58341dd

File tree

179 files changed

+179
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+179
-2
lines changed

cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ fromPackageDescription haskellResolver nixpkgsResolver missingDeps flags Package
112112
& jailbreak .~ False
113113
& doCheck .~ True
114114
& doBenchmark .~ False
115-
& testTarget .~ mempty
115+
& testTarget .~ unwords (map (unUnqualComponentName . testName) testSuites)
116116
& hyperlinkSource .~ True
117117
& enableSplitObjs .~ True
118118
& enableLibraryProfiling .~ False

cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ opencvOverrides = set phaseOverrides "hardeningDisable = [ \"bindnow\" ];"
358358
. over (libraryDepends . pkgconfig) (replace (pkg "opencv") (pkg "opencv3"))
359359

360360
hspecCoreOverrides :: Derivation -> Derivation -- https://github.com/hspec/hspec/issues/330
361-
hspecCoreOverrides = set phaseOverrides "testTarget = \"--test-option=--skip --test-option='Test.Hspec.Core.Runner.hspecResult runs specs in parallel'\";"
361+
hspecCoreOverrides = set testTarget "--test-option=--skip --test-option='Test.Hspec.Core.Runner.hspecResult runs specs in parallel'"
362362

363363
cabal2nixOverrides :: Derivation -> Derivation
364364
cabal2nixOverrides = set phaseOverrides $ unlines

cabal2nix/test/golden-test-cases/ChasingBottoms.nix.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ mkDerivation {
1111
testHaskellDepends = [
1212
array base containers mtl QuickCheck random syb
1313
];
14+
testTarget = "ChasingBottomsTestSuite";
1415
description = "For testing partial and infinite values";
1516
license = lib.licenses.mit;
1617
}

cabal2nix/test/golden-test-cases/FenwickTree.nix.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ mkDerivation {
66
enableSeparateDataOutput = true;
77
libraryHaskellDepends = [ base QuickCheck template-haskell ];
88
testHaskellDepends = [ base QuickCheck template-haskell ];
9+
testTarget = "test_FenwickTree";
910
homepage = "https://github.com/mgajda/FenwickTree";
1011
description = "Data structure for fast query and update of cumulative sums";
1112
license = lib.licenses.bsd3;

cabal2nix/test/golden-test-cases/HPDF.nix.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ mkDerivation {
1010
mtl random vector zlib
1111
];
1212
testHaskellDepends = [ base HTF ];
13+
testTarget = "HPDF-Tests";
1314
homepage = "http://www.alpheccar.org";
1415
description = "Generation of PDF documents";
1516
license = lib.licenses.bsd3;

cabal2nix/test/golden-test-cases/HTF.nix.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ mkDerivation {
2525
process random regex-compat template-haskell temporary text
2626
unordered-containers
2727
];
28+
testTarget = "MiscTests TestHTF TestThreadPools";
2829
homepage = "https://github.com/skogsbaer/HTF/";
2930
description = "The Haskell Test Framework";
3031
license = "LGPL";

cabal2nix/test/golden-test-cases/HTTP.nix.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ mkDerivation {
1515
http-types httpd-shed HUnit mtl network network-uri pureMD5 split
1616
test-framework test-framework-hunit wai warp
1717
];
18+
testTarget = "test";
1819
homepage = "https://github.com/haskell/HTTP";
1920
description = "A library for client-side HTTP";
2021
license = lib.licenses.bsd3;

cabal2nix/test/golden-test-cases/MissingH.nix.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ mkDerivation {
1616
hslogger HUnit mtl network old-locale old-time parsec process
1717
QuickCheck random regex-compat testpack time unix
1818
];
19+
testTarget = "runtests";
1920
homepage = "http://software.complete.org/missingh";
2021
description = "Large utility library";
2122
license = lib.licenses.bsd3;

cabal2nix/test/golden-test-cases/QuickCheck.nix.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ mkDerivation {
1010
transformers
1111
];
1212
testHaskellDepends = [ base ];
13+
testTarget = "test-quickcheck test-quickcheck-gcoarbitrary test-quickcheck-generators test-quickcheck-gshrink";
1314
homepage = "https://github.com/nick8325/quickcheck";
1415
description = "Automatic testing of Haskell programs";
1516
license = lib.licenses.bsd3;

cabal2nix/test/golden-test-cases/ReadArgs.nix.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ mkDerivation {
88
libraryHaskellDepends = [ base system-filepath text ];
99
executableHaskellDepends = [ base system-filepath text ];
1010
testHaskellDepends = [ base hspec system-filepath text ];
11+
testTarget = "ReadArgsSpec";
1112
homepage = "http://github.com/rampion/ReadArgs";
1213
description = "Simple command line argument parsing";
1314
license = lib.licenses.bsd3;

0 commit comments

Comments
 (0)