Skip to content

Commit cc176e1

Browse files
sjakobimergify[bot]
authored andcommitted
Simplify the doctest invocation (#1433)
* Simplify the doctest invocation This doesn't change the number of tests covered. Fixes #1431. * Try to fix doctests on Hydra * Fix doctests with cabal v1-test and try to explain how * Don't target the Dhall module directly Dhall.Tutorial already depends on it.
1 parent 711ee2b commit cc176e1

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

dhall/doctest/Main.hs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,17 @@ main = do
2727
Test.DocTest.doctest
2828
[ "-DWITH_HTTP"
2929
, "--fast"
30+
, prefix </> "ghc-src"
31+
32+
-- Unfortunately we cannot target the entire @src@ directory.
33+
-- The reason is that src/Dhall/Version.hs depends on
34+
-- the generated Paths_dhall module which is "out-of-scope"
35+
-- when running the testsuite with cabal v1-test.
36+
-- Instead, we target a selection of modules whose combined module
37+
-- dependency tree covers all modules that contain doctests.
38+
39+
-- , prefix </> "src"
3040
, "-i" <> (prefix </> "src")
31-
, "-i" <> (prefix </> "ghc-src")
32-
, prefix </> "src/Dhall.hs"
33-
, prefix </> "src/Dhall/Import.hs"
34-
, prefix </> "src/Dhall/Tutorial.hs"
3541
, prefix </> "src/Dhall/Tags.hs"
42+
, prefix </> "src/Dhall/Tutorial.hs"
3643
]

0 commit comments

Comments
 (0)