...
 
Commits (3)
......@@ -143,6 +143,9 @@ executable cabal
if impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances
if impl(ghc >=8.10)
ghc-options: -Wunused-packages
ghc-options: -rtsopts -threaded
......@@ -353,7 +356,6 @@ executable cabal
HTTP >= 4000.1.5 && < 4000.4,
mtl >= 2.0 && < 2.3,
network-uri >= 2.6.0.2 && < 2.7,
network >= 2.6 && < 3.2,
pretty >= 1.1 && < 1.2,
process >= 1.2.3.0 && < 1.7,
random >= 1 && < 1.2,
......
......@@ -141,6 +141,9 @@ library cabal-lib-client
if impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances
if impl(ghc >=8.10)
ghc-options: -Wunused-packages
hs-source-dirs: src
exposed-modules:
-- this modules are moved from Cabal
......@@ -347,7 +350,6 @@ library cabal-lib-client
HTTP >= 4000.1.5 && < 4000.4,
mtl >= 2.0 && < 2.3,
network-uri >= 2.6.0.2 && < 2.7,
network >= 2.6 && < 3.2,
pretty >= 1.1 && < 1.2,
process >= 1.2.3.0 && < 1.7,
random >= 1 && < 1.2,
......@@ -403,6 +405,9 @@ library cabal-install-solver-dsl
if impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances
if impl(ghc >=8.10)
ghc-options: -Wunused-packages
hs-source-dirs: solver-dsl
exposed-modules:
UnitTests.Distribution.Solver.Modular.DSL
......@@ -423,6 +428,9 @@ executable cabal
if impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances
if impl(ghc >=8.10)
ghc-options: -Wunused-packages
ghc-options: -rtsopts -threaded
......@@ -440,10 +448,21 @@ executable cabal
-- Small, fast running tests.
--
Test-Suite unit-tests
default-language: Haskell2010
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
if impl(ghc >= 8.0)
ghc-options: -Wcompat
-Wnoncanonical-monad-instances
if impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances
if impl(ghc >=8.10)
ghc-options: -Wunused-packages
ghc-options: -threaded
type: exitcode-stdio-1.0
main-is: UnitTests.hs
hs-source-dirs: tests
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -main-is UnitTests
other-modules:
UnitTests.Distribution.Client.ArbitraryInstances
UnitTests.Distribution.Client.BuildReport
......@@ -474,7 +493,6 @@ Test-Suite unit-tests
build-depends:
array,
base,
async,
bytestring,
cabal-lib-client,
cabal-install-solver-dsl,
......@@ -483,7 +501,6 @@ Test-Suite unit-tests
Cabal-tree-diff,
Cabal-QuickCheck,
containers,
deepseq,
mtl,
random,
directory,
......@@ -492,64 +509,71 @@ Test-Suite unit-tests
time,
zlib,
network-uri >= 2.6.2.0 && <2.6.4.0,
network,
tasty >= 1.2.3 && <1.4,
tasty-golden >=2.3.1.1 && <2.4,
tasty-hunit >= 0.10,
tasty-quickcheck,
tagged,
tree-diff,
QuickCheck >= 2.14 && <2.15
ghc-options: -threaded
default-language: Haskell2010
-- Tests to run with a limited stack and heap size
--
Test-Suite memory-usage-tests
default-language: Haskell2010
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
if impl(ghc >= 8.0)
ghc-options: -Wcompat
-Wnoncanonical-monad-instances
if impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances
if impl(ghc >=8.10)
ghc-options: -Wunused-packages
ghc-options: -threaded
ghc-options: "-with-rtsopts=-M4M -K1K"
type: exitcode-stdio-1.0
main-is: MemoryUsageTests.hs
hs-source-dirs: tests
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns "-with-rtsopts=-M4M -K1K" -main-is MemoryUsageTests
other-modules:
UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
UnitTests.Distribution.Solver.Modular.MemoryUsage
UnitTests.Options
build-depends:
base,
async,
Cabal,
cabal-lib-client,
cabal-install-solver-dsl,
containers,
deepseq,
tagged,
tasty >= 1.2.3 && <1.4,
tasty-hunit >= 0.10
ghc-options: -threaded
default-language: Haskell2010
-- Slow solver tests
--
Test-Suite solver-quickcheck
default-language: Haskell2010
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
if impl(ghc >= 8.0)
ghc-options: -Wcompat
-Wnoncanonical-monad-instances
if impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances
if impl(ghc >=8.10)
ghc-options: -Wunused-packages
ghc-options: -threaded
type: exitcode-stdio-1.0
main-is: SolverQuickCheck.hs
hs-source-dirs: tests
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -main-is SolverQuickCheck
other-modules:
UnitTests.Distribution.Solver.Modular.QuickCheck
UnitTests.Distribution.Solver.Modular.QuickCheck.Utils
build-depends:
base,
async,
Cabal,
Cabal-QuickCheck,
cabal-lib-client,
cabal-install-solver-dsl,
containers,
deepseq >= 1.2,
hashable,
random,
......@@ -559,18 +583,24 @@ Test-Suite solver-quickcheck
QuickCheck >= 2.14 && <2.15,
pretty-show >= 1.6.15
ghc-options: -threaded
default-language: Haskell2010
-- Integration tests that use the cabal-install code directly
-- but still build whole projects
test-suite integration-tests2
default-language: Haskell2010
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
if impl(ghc >= 8.0)
ghc-options: -Wcompat
-Wnoncanonical-monad-instances
if impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances
if impl(ghc >=8.10)
ghc-options: -Wunused-packages
ghc-options: -threaded
type: exitcode-stdio-1.0
main-is: IntegrationTests2.hs
hs-source-dirs: tests
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -main-is IntegrationTests2
other-modules:
build-depends:
base,
......@@ -578,14 +608,10 @@ test-suite integration-tests2
Cabal,
cabal-lib-client,
containers,
deepseq,
directory,
edit-distance,
filepath,
tasty >= 1.2.3 && <1.4,
tasty-hunit >= 0.10,
tagged
ghc-options: -threaded
default-language: Haskell2010
......@@ -143,6 +143,9 @@ executable cabal
if impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances
if impl(ghc >=8.10)
ghc-options: -Wunused-packages
ghc-options: -rtsopts -threaded
......@@ -353,7 +356,6 @@ executable cabal
HTTP >= 4000.1.5 && < 4000.4,
mtl >= 2.0 && < 2.3,
network-uri >= 2.6.0.2 && < 2.7,
network >= 2.6 && < 3.2,
pretty >= 1.1 && < 1.2,
process >= 1.2.3.0 && < 1.7,
random >= 1 && < 1.2,
......
......@@ -31,7 +31,6 @@ Version: 3.5.0.0
HTTP >= 4000.1.5 && < 4000.4,
mtl >= 2.0 && < 2.3,
network-uri >= 2.6.0.2 && < 2.7,
network >= 2.6 && < 3.2,
pretty >= 1.1 && < 1.2,
process >= 1.2.3.0 && < 1.7,
random >= 1 && < 1.2,
......@@ -76,6 +75,9 @@ Version: 3.5.0.0
if impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances
if impl(ghc >=8.10)
ghc-options: -Wunused-packages
{% endblock %}
{% defblock buildInfo %}
{% if dev %}
......@@ -468,10 +470,11 @@ executable cabal
-- Small, fast running tests.
--
Test-Suite unit-tests
{% useblock componentCommon %}
ghc-options: -threaded
type: exitcode-stdio-1.0
main-is: UnitTests.hs
hs-source-dirs: tests
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -main-is UnitTests
other-modules:
UnitTests.Distribution.Client.ArbitraryInstances
UnitTests.Distribution.Client.BuildReport
......@@ -502,7 +505,6 @@ Test-Suite unit-tests
build-depends:
array,
base,
async,
bytestring,
cabal-lib-client,
cabal-install-solver-dsl,
......@@ -511,7 +513,6 @@ Test-Suite unit-tests
Cabal-tree-diff,
Cabal-QuickCheck,
containers,
deepseq,
mtl,
random,
directory,
......@@ -520,64 +521,51 @@ Test-Suite unit-tests
time,
zlib,
network-uri >= 2.6.2.0 && <2.6.4.0,
network,
tasty >= 1.2.3 && <1.4,
tasty-golden >=2.3.1.1 && <2.4,
tasty-hunit >= 0.10,
tasty-quickcheck,
tagged,
tree-diff,
QuickCheck >= 2.14 && <2.15
ghc-options: -threaded
default-language: Haskell2010
-- Tests to run with a limited stack and heap size
--
Test-Suite memory-usage-tests
{% useblock componentCommon %}
ghc-options: -threaded
ghc-options: "-with-rtsopts=-M4M -K1K"
type: exitcode-stdio-1.0
main-is: MemoryUsageTests.hs
hs-source-dirs: tests
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns "-with-rtsopts=-M4M -K1K" -main-is MemoryUsageTests
other-modules:
UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
UnitTests.Distribution.Solver.Modular.MemoryUsage
UnitTests.Options
build-depends:
base,
async,
Cabal,
cabal-lib-client,
cabal-install-solver-dsl,
containers,
deepseq,
tagged,
tasty >= 1.2.3 && <1.4,
tasty-hunit >= 0.10
ghc-options: -threaded
default-language: Haskell2010
-- Slow solver tests
--
Test-Suite solver-quickcheck
{% useblock componentCommon %}
ghc-options: -threaded
type: exitcode-stdio-1.0
main-is: SolverQuickCheck.hs
hs-source-dirs: tests
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -main-is SolverQuickCheck
other-modules:
UnitTests.Distribution.Solver.Modular.QuickCheck
UnitTests.Distribution.Solver.Modular.QuickCheck.Utils
build-depends:
base,
async,
Cabal,
Cabal-QuickCheck,
cabal-lib-client,
cabal-install-solver-dsl,
containers,
deepseq >= 1.2,
hashable,
random,
......@@ -587,18 +575,14 @@ Test-Suite solver-quickcheck
QuickCheck >= 2.14 && <2.15,
pretty-show >= 1.6.15
ghc-options: -threaded
default-language: Haskell2010
-- Integration tests that use the cabal-install code directly
-- but still build whole projects
test-suite integration-tests2
{% useblock componentCommon %}
ghc-options: -threaded
type: exitcode-stdio-1.0
main-is: IntegrationTests2.hs
hs-source-dirs: tests
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -main-is IntegrationTests2
other-modules:
build-depends:
base,
......@@ -606,15 +590,11 @@ test-suite integration-tests2
Cabal,
cabal-lib-client,
containers,
deepseq,
directory,
edit-distance,
filepath,
tasty >= 1.2.3 && <1.4,
tasty-hunit >= 0.10,
tagged
ghc-options: -threaded
default-language: Haskell2010
{% endif %}
......@@ -8,7 +8,7 @@
-- For the handy instance IsString PackageIdentifier
{-# OPTIONS_GHC -fno-warn-orphans #-}
module IntegrationTests2 where
module Main where
import Distribution.Client.Compat.Prelude
import Prelude ()
......
module MemoryUsageTests where
module Main where
import Test.Tasty
......
module SolverQuickCheck where
module Main where
import Test.Tasty
......
{-# LANGUAGE ScopedTypeVariables #-}
module UnitTests where
module Main where
import Test.Tasty
......
......@@ -16,7 +16,7 @@ import Control.Applicative
#endif
import Data.Map (Map)
import qualified Data.Map as Map
import Data.List
import Data.List (isPrefixOf, intercalate, (\\))
import Network.URI (URI)
import Distribution.Deprecated.ParseUtils
......
......@@ -9,7 +9,7 @@ import Distribution.Simple.Program
import Distribution.Verbosity as Verbosity
import Distribution.Client.Types.SourceRepo (SourceRepositoryPackage (..), SourceRepoProxy)
import Data.List
import Data.List (mapAccumL)
import Data.Tuple
import qualified Data.Map as Map
import qualified Data.Set as Set
......