Skip to content
Snippets Groups Projects
Commit c4b22e9f authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Port custom/custom_dep to new test suite.

parent 63252fb6
No related branches found
No related tags found
No related merge requests found
. ./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
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"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment