Skip to content

Commit

Permalink
Make tests and benchmarks run again
Browse files Browse the repository at this point in the history
See the comment added in this commit, further investigation is likely
needed.
  • Loading branch information
snoyberg committed Aug 17, 2017
1 parent f9a41d3 commit 66a9b1e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Stack/Package.hs
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,17 @@ packageFromPackageDescription packageConfig pkgFlags pkg =
, packageAllDeps = S.fromList (M.keys deps)
, packageHasLibrary = maybe False (buildable . libBuildInfo) (library pkg)
, packageTests = M.fromList
[(T.pack (Cabal.unUnqualComponentName $ testName t), testInterface t) | t <- testSuites pkg
, buildable (testBuildInfo t)]
[(T.pack (Cabal.unUnqualComponentName $ testName t), testInterface t) | t <- testSuites pkg]
-- FIXME: Previously, we only included buildable components
-- here. Since Cabal 2.0, this ended up disabling test running
-- in all cases. Need to investigate if that's a change in
-- Cabal behavior or how we're piping data through the system
-- in response to Cabal data type changes. A cleanup of the
-- PackageConfig datatype (which will probably happen for
-- componentized builds) will likely make all of this clearer.
, packageBenchmarks = S.fromList
[T.pack (Cabal.unUnqualComponentName $ benchmarkName biBuildInfo) | biBuildInfo <- benchmarks pkg
, buildable (benchmarkBuildInfo biBuildInfo)]
[T.pack (Cabal.unUnqualComponentName $ benchmarkName biBuildInfo) | biBuildInfo <- benchmarks pkg]
-- Same comment about buildable applies here too.
, packageExes = S.fromList
[T.pack (Cabal.unUnqualComponentName $ exeName biBuildInfo)
| biBuildInfo <- executables pkg
Expand Down

0 comments on commit 66a9b1e

Please sign in to comment.