Skip to content

Commit

Permalink
Explicitly list testTargets
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
TeofilC committed Apr 19, 2024
1 parent 89857ea commit c44a20e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ fromPackageDescription haskellResolver nixpkgsResolver missingDeps flags Package
& jailbreak .~ False
& doCheck .~ True
& doBenchmark .~ False
& testTarget .~ mempty
& testTarget .~ unwords (map (unUnqualComponentName . testName) testSuites)
& hyperlinkSource .~ True
& enableSplitObjs .~ True
& enableLibraryProfiling .~ False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ opencvOverrides = set phaseOverrides "hardeningDisable = [ \"bindnow\" ];"
. over (libraryDepends . pkgconfig) (replace (pkg "opencv") (pkg "opencv3"))

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

cabal2nixOverrides :: Derivation -> Derivation
cabal2nixOverrides = set phaseOverrides $ unlines
Expand Down

0 comments on commit c44a20e

Please sign in to comment.