Commit 4d87e91d authored by Edward Z. Yang's avatar Edward Z. Yang

Fix #2755 by always respecting enable flags on configure.

Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent c2c5d36b
......@@ -386,8 +386,13 @@ configurePackage verbosity platform comp scriptOptions configFlags
-- Use '--exact-configuration' if supported.
configExactConfiguration = toFlag True,
configVerbosity = toFlag verbosity,
configBenchmarks = toFlag (BenchStanzas `elem` stanzas),
-- NB: if the user explicitly specified
-- --enable-tests/--enable-benchmarks, always respect it.
-- (But if they didn't, let solver decide.)
configBenchmarks = toFlag (BenchStanzas `elem` stanzas)
`mappend` configBenchmarks configFlags,
configTests = toFlag (TestStanzas `elem` stanzas)
`mappend` configTests configFlags
}
pkg = case finalizePD flags (enableStanzas stanzas)
......
......@@ -97,6 +97,10 @@ Extra-Source-Files:
tests/IntegrationTests/new-build/monitor_cabal_files/q/Setup.hs
tests/IntegrationTests/new-build/monitor_cabal_files/q/q-broken.cabal.in
tests/IntegrationTests/new-build/monitor_cabal_files/q/q-fixed.cabal.in
tests/IntegrationTests/regression/t2755.sh
tests/IntegrationTests/regression/t2755/A.hs
tests/IntegrationTests/regression/t2755/Setup.hs
tests/IntegrationTests/regression/t2755/test-t2755.cabal
tests/IntegrationTests/regression/t3199.sh
tests/IntegrationTests/regression/t3199/Main.hs
tests/IntegrationTests/regression/t3199/Setup.hs
......
. ./common.sh
cd t2755
cabal configure --enable-tests
(cabal test || true) | tee result.log
! grep "Re-configuring" result.log > /dev/null
import Distribution.Simple
main = defaultMain
name: test-t2755
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
category: Test
build-type: Simple
cabal-version: >=1.10
library
exposed-modules: A
build-depends: base
default-language: Haskell2010
Markdown is supported
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