diff --git a/.travis.yml b/.travis.yml index 4a6f6c2..1a26676 100644 --- a/.travis.yml +++ b/.travis.yml @@ -176,7 +176,7 @@ install: set -ex case "$BUILD" in stack) - stack -j$JOBS --no-terminal --install-ghc $ARGS test --bench --only-dependencies + stack -j$JOBS --no-terminal --install-ghc $ARGS test --bench --only-dependencies --flag brittany:brittany-test-perf ;; cabal*) cabal --version @@ -219,6 +219,7 @@ install: echo 'packages: .' > cabal.project echo 'package brittany' > cabal.project.local echo ' ghc-options: -Werror -with-rtsopts=-N1' >> cabal.project.local + echo ' flags: +brittany-test-perf' >> cabal.project.local rm -f cabal.project.freeze cabal new-build -j$JOBS --enable-test --enable-benchmarks --dep cabal new-build -j$JOBS --disable-tests --disable-benchmarks --dep @@ -231,11 +232,11 @@ script: set -ex case "$BUILD" in stack) - better_wait stack -j$JOBS --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps --ghc-options="-j1 +RTS -M500M -RTS -Werror -with-rtsopts=-N1" + better_wait stack -j$JOBS --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps --ghc-options="-j1 +RTS -M500M -RTS -Werror -with-rtsopts=-N1" --flag brittany:brittany-test-perf ;; cabal) if [ -f configure.ac ]; then autoreconf -i; fi - cabal configure --enable-tests --enable-benchmarks -v # -v2 provides useful information for debugging + cabal configure --enable-tests --enable-benchmarks -v --flags="brittany-test-perf" # -v2 provides useful information for debugging better_wait cabal build -j$JOBS --ghc-options="-j1 +RTS -M500M -RTS -Werror" # this builds all libraries and executables (including tests/benchmarks) time cabal test --ghc-options="-with-rtsopts=-N1" ;; diff --git a/brittany.cabal b/brittany.cabal index 7eb6e46..f65c1e6 100644 --- a/brittany.cabal +++ b/brittany.cabal @@ -39,6 +39,11 @@ flag brittany-dev-lib default: False manual: True +flag brittany-test-perf + description: determines if performance test suite is enabled + default: False + manual: True + library { default-language: Haskell2010 @@ -205,7 +210,7 @@ executable brittany } test-suite unittests - if flag(brittany-dev-lib) { + if flag(brittany-dev-lib) || !flag(brittany-test-perf) { buildable: False } else { buildable: True