diff --git a/cabal-install/tests/IntegrationTests/custom/custom_dep.sh b/cabal-install/tests/IntegrationTests/custom/custom_dep.sh deleted file mode 100644 index f55301399f200f0202fed1221d56d0b62529720f..0000000000000000000000000000000000000000 --- a/cabal-install/tests/IntegrationTests/custom/custom_dep.sh +++ /dev/null @@ -1,22 +0,0 @@ -. ./common.sh - -# On Travis OSX, Cabal shipped with GHC 7.8 does not work -# with error "setup: /usr/bin/ar: permission denied"; see -# also https://github.com/haskell/cabal/issues/3938 -# This is a hack to make the test not run in this case. -if [ "$TRAVIS_OS_NAME" = "osx" ]; then - require_ghc_ge 710 -fi - -cd custom_dep -cabal sandbox init -cabal sandbox add-source custom -cabal sandbox add-source client -# Some care must be taken here: we want the Setup script -# to build against GHC's bundled Cabal, but passing -# --package-db=clear --package-db=global to cabal is -# insufficient, as these flags are NOT respected when -# building Setup scripts. Changing HOME to a location -# which definitely does not have a local .cabal -# directory works, the environment variable propagates to GHC. -HOME=`pwd` cabal install client diff --git a/cabal-install/tests/IntegrationTests/custom/custom_dep/client/B.hs b/cabal-testsuite/PackageTests/CustomDep/client/B.hs similarity index 100% rename from cabal-install/tests/IntegrationTests/custom/custom_dep/client/B.hs rename to cabal-testsuite/PackageTests/CustomDep/client/B.hs diff --git a/cabal-install/tests/IntegrationTests/custom/custom_dep/client/Setup.hs b/cabal-testsuite/PackageTests/CustomDep/client/Setup.hs similarity index 100% rename from cabal-install/tests/IntegrationTests/custom/custom_dep/client/Setup.hs rename to cabal-testsuite/PackageTests/CustomDep/client/Setup.hs diff --git a/cabal-install/tests/IntegrationTests/custom/custom_dep/client/client.cabal b/cabal-testsuite/PackageTests/CustomDep/client/client.cabal similarity index 100% rename from cabal-install/tests/IntegrationTests/custom/custom_dep/client/client.cabal rename to cabal-testsuite/PackageTests/CustomDep/client/client.cabal diff --git a/cabal-install/tests/IntegrationTests/custom/custom_dep/custom/A.hs b/cabal-testsuite/PackageTests/CustomDep/custom/A.hs similarity index 100% rename from cabal-install/tests/IntegrationTests/custom/custom_dep/custom/A.hs rename to cabal-testsuite/PackageTests/CustomDep/custom/A.hs diff --git a/cabal-install/tests/IntegrationTests/custom/custom_dep/custom/Setup.hs b/cabal-testsuite/PackageTests/CustomDep/custom/Setup.hs similarity index 100% rename from cabal-install/tests/IntegrationTests/custom/custom_dep/custom/Setup.hs rename to cabal-testsuite/PackageTests/CustomDep/custom/Setup.hs diff --git a/cabal-install/tests/IntegrationTests/custom/custom_dep/custom/custom.cabal b/cabal-testsuite/PackageTests/CustomDep/custom/custom.cabal similarity index 100% rename from cabal-install/tests/IntegrationTests/custom/custom_dep/custom/custom.cabal rename to cabal-testsuite/PackageTests/CustomDep/custom/custom.cabal diff --git a/cabal-testsuite/PackageTests/CustomDep/sandbox.test.hs b/cabal-testsuite/PackageTests/CustomDep/sandbox.test.hs new file mode 100644 index 0000000000000000000000000000000000000000..9c2111a6794f8e66d0592e8e244a0720480a2e06 --- /dev/null +++ b/cabal-testsuite/PackageTests/CustomDep/sandbox.test.hs @@ -0,0 +1,14 @@ +import Test.Cabal.Prelude +main = cabalTest $ do + osx <- isOSX + -- On Travis OSX, Cabal shipped with GHC 7.8 does not work + -- with error "setup: /usr/bin/ar: permission denied"; see + -- also https://github.com/haskell/cabal/issues/3938 + -- This is a hack to make the test not run in this case. + when osx $ skipUnless =<< ghcVersionIs (>= mkVersion [7,10]) + withSandbox $ do + cabal_sandbox "add-source" ["custom"] + cabal_sandbox "add-source" ["client"] + -- NB: This test relies critically on the Setup script being + -- built against GHC's bundled Cabal. + cabal "install" ["client"]