1 module UnitTests
.Distribution
.Client
.Init
7 import qualified UnitTests
.Distribution
.Client
.Init
.FileCreators
as FileCreators
8 import qualified UnitTests
.Distribution
.Client
.Init
.Golden
as Golden
9 import qualified UnitTests
.Distribution
.Client
.Init
.Interactive
as Interactive
10 import qualified UnitTests
.Distribution
.Client
.Init
.NonInteractive
as NonInteractive
11 import qualified UnitTests
.Distribution
.Client
.Init
.Simple
as Simple
13 import UnitTests
.Distribution
.Client
.Init
.Utils
15 import Distribution
.Client
.Config
16 import Distribution
.Client
.IndexUtils
17 import Distribution
.Client
.Init
.Types
18 import Distribution
.Client
.Sandbox
19 import Distribution
.Client
.Setup
20 import Distribution
.Simple
.Compiler
21 import Distribution
.Verbosity
23 tests
:: IO [TestTree
]
25 confFlags
<- loadConfigOrSandboxConfig v defaultGlobalFlags
27 let confFlags
' = savedConfigureFlags confFlags `mappend` compFlags
28 initFlags
' = savedInitFlags confFlags `mappend` emptyFlags
29 globalFlags
' = savedGlobalFlags confFlags `mappend` defaultGlobalFlags
31 (comp
, _
, progdb
) <- configCompilerAux
' confFlags
'
33 withRepoContext v globalFlags
' $ \repoCtx
-> do
34 let pkgDb
= configPackageDB
' confFlags
'
36 pkgIx
<- getInstalledPackages v comp
(interpretPackageDBStack Nothing pkgDb
) progdb
37 srcDb
<- getSourcePackages v repoCtx
40 [ Interactive
.tests v initFlags
' pkgIx srcDb
41 , NonInteractive
.tests v initFlags
' comp pkgIx srcDb
42 , Golden
.tests v initFlags
' pkgIx srcDb
43 , Simple
.tests v initFlags
' pkgIx srcDb
44 , FileCreators
.tests v initFlags
' comp pkgIx srcDb
50 compFlags
:: ConfigFlags
51 compFlags
= mempty
{configHcPath
= initHcPath emptyFlags
}