Skip to content

Testing with GHC 7.0 and 7.2 AND some improvements to package-tests #3251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Cabal/Cabal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,14 @@ library
if !impl(ghc >= 7.0)
default-extensions: CPP

executable cabal-setup
build-depends: base, Cabal
main-is: Setup.hs
-- Actually, we don't really want anything from tests; just
-- want to make sure we don't pick up source files in .
hs-source-dirs: tests
default-language: Haskell98

-- Small, fast running tests.
test-suite unit-tests
type: exitcode-stdio-1.0
Expand Down Expand Up @@ -384,6 +392,7 @@ test-suite package-tests
PackageTests.TestSuiteTests.ExeV10.Check
PackageTests.PackageTester
hs-source-dirs: tests
build-tools: cabal-setup
build-depends:
base,
containers,
Expand Down
4 changes: 0 additions & 4 deletions Cabal/tests/PackageTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,6 @@ main = do
putStrLn $ "CABAL_PACKAGETESTS_DB_STACK=" ++ showDBStack packageDBStack0
putStrLn $ "CABAL_PACKAGETESTS_WITH_DB_STACK=" ++ showDBStack withGhcDBStack0

-- Create a shared Setup executable to speed up Simple tests
putStrLn $ "Building shared ./Setup executable"
rawCompileSetup verbosity suite [] "tests"

defaultMainWithIngredients options $
runTestTree "Package Tests" (tests suite)

Expand Down
2 changes: 1 addition & 1 deletion Cabal/tests/PackageTests/PackageTester.hs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ type PackageSpec = FilePath
simpleSetupPath :: TestM FilePath
simpleSetupPath = do
(suite, _) <- ask
return (absoluteCWD suite </> "tests/Setup")
return (cabalDistPref suite </> "build" </> "cabal-setup" </> "cabal-setup")

-- | The absolute path to the directory containing the files for
-- this tests; usually @Check.hs@ and any test packages.
Expand Down