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
.Verbosity
22 tests
:: IO [TestTree
]
24 confFlags
<- loadConfigOrSandboxConfig v defaultGlobalFlags
26 let confFlags
' = savedConfigureFlags confFlags `mappend` compFlags
27 initFlags
' = savedInitFlags confFlags `mappend` emptyFlags
28 globalFlags
' = savedGlobalFlags confFlags `mappend` defaultGlobalFlags
30 (comp
, _
, progdb
) <- configCompilerAux
' confFlags
'
32 withRepoContext v globalFlags
' $ \repoCtx
-> do
33 let pkgDb
= configPackageDB
' confFlags
'
35 pkgIx
<- getInstalledPackages v comp pkgDb progdb
36 srcDb
<- getSourcePackages v repoCtx
39 [ Interactive
.tests v initFlags
' pkgIx srcDb
40 , NonInteractive
.tests v initFlags
' comp pkgIx srcDb
41 , Golden
.tests v initFlags
' pkgIx srcDb
42 , Simple
.tests v initFlags
' pkgIx srcDb
43 , FileCreators
.tests v initFlags
' comp pkgIx srcDb
49 compFlags
:: ConfigFlags
50 compFlags
= mempty
{configHcPath
= initHcPath emptyFlags
}