Commit 64f5c5b8 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Update hackage index before running integration tests

Now that we default to the secure repo, we need to run cabal update the
first time before running cabal (new-)build/etc, which is essentially
what the integration tests do. The travis and appveyor scripts already
did a cabal update at the beginning, but this one was using the
boostrap cabal and currently that version does not use the secure repo
format by default.
parent 9eb58dba
......@@ -26,6 +26,8 @@ build_script:
- echo "" | ..\cabal install --only-dependencies --enable-tests
- ..\cabal configure --user --ghc-option=-Werror --enable-tests
- ..\cabal build
# update package index again, this time for the cabal under test
- dist\build\cabal\cabal.exe update
- ..\cabal test unit-tests --show-details=streaming --test-option=--pattern=!FileMonitor --test-option=--hide-successes
- ..\cabal test integration-tests --show-details=streaming --test-option=--pattern=!exec --test-option=--hide-successes
- ..\cabal test integration-tests2 --show-details=streaming --test-option=--hide-successes
......@@ -86,6 +86,11 @@ timed cabal new-build cabal-install:cabal \
cabal-install:unit-tests \
# The integration-tests2 need the hackage index, and need it in the secure
# format, which is not necessarily the default format of the bootstrap cabal.
# If the format does match then this will be very quick.
timed ${CABAL_INSTALL_BDIR}/build/cabal/cabal update
# Run tests
(cd cabal-install && timed ${CABAL_INSTALL_BDIR}/build/unit-tests/unit-tests $TEST_OPTIONS) || exit $?
(cd cabal-install && timed ${CABAL_INSTALL_BDIR}/build/solver-quickcheck/solver-quickcheck $TEST_OPTIONS --quickcheck-tests=1000) || exit $?
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment