1 {-# LANGUAGE OverloadedStrings #-}
2 import Test
.Cabal
.Prelude
3 import Test
.Cabal
.DecodeShowBuildInfo
5 import Control
.Monad
.Trans
.Reader
8 -- Leaf component fails to compile, should still dump
9 -- build info for both components.
10 fails
$ runShowBuildInfo
["test:CompileFail-test"]
12 -- Lib has to be built, thus info is dumped
13 assertComponent
"CompileFail" mainLib
16 , sourceDirs
= ["src"]
19 -- Build Info is still dumped, although compilation failed
20 assertComponent
"CompileFail" (test
"CompileFail-test")
22 { sourceFiles
= ["Main.hs"]
23 , sourceDirs
= ["test"]
26 fails
$ runShowBuildInfo
["exe:CompileFail-exe"]
28 -- Internal Lib has to be built, thus info is dumped
29 assertComponent
"CompileFail" (lib
"failing")
31 { modules
= ["MyLib2"]
32 , sourceDirs
= ["src"]
34 -- However, since the internal lib failed to compile
35 -- we can not have executable build information.
36 Just plan
<- fmap testPlan ask
37 let fp
= buildInfoFile plan
"CompileFail" (exe
"CompileFail-exe")