Disable perf test by default via new cabal flag

remotes/felixonmars/release
Lennart Spitzner 2019-09-29 13:02:55 +02:00
parent 0795a39806
commit a98d643a62
2 changed files with 10 additions and 4 deletions

View File

@ -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"
;;

View File

@ -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