Disable perf test by default via new cabal flag
parent
0795a39806
commit
a98d643a62
|
@ -176,7 +176,7 @@ install:
|
||||||
set -ex
|
set -ex
|
||||||
case "$BUILD" in
|
case "$BUILD" in
|
||||||
stack)
|
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*)
|
||||||
cabal --version
|
cabal --version
|
||||||
|
@ -219,6 +219,7 @@ install:
|
||||||
echo 'packages: .' > cabal.project
|
echo 'packages: .' > cabal.project
|
||||||
echo 'package brittany' > cabal.project.local
|
echo 'package brittany' > cabal.project.local
|
||||||
echo ' ghc-options: -Werror -with-rtsopts=-N1' >> 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
|
rm -f cabal.project.freeze
|
||||||
cabal new-build -j$JOBS --enable-test --enable-benchmarks --dep
|
cabal new-build -j$JOBS --enable-test --enable-benchmarks --dep
|
||||||
cabal new-build -j$JOBS --disable-tests --disable-benchmarks --dep
|
cabal new-build -j$JOBS --disable-tests --disable-benchmarks --dep
|
||||||
|
@ -231,11 +232,11 @@ script:
|
||||||
set -ex
|
set -ex
|
||||||
case "$BUILD" in
|
case "$BUILD" in
|
||||||
stack)
|
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)
|
cabal)
|
||||||
if [ -f configure.ac ]; then autoreconf -i; fi
|
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)
|
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"
|
time cabal test --ghc-options="-with-rtsopts=-N1"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -39,6 +39,11 @@ flag brittany-dev-lib
|
||||||
default: False
|
default: False
|
||||||
manual: True
|
manual: True
|
||||||
|
|
||||||
|
flag brittany-test-perf
|
||||||
|
description: determines if performance test suite is enabled
|
||||||
|
default: False
|
||||||
|
manual: True
|
||||||
|
|
||||||
library {
|
library {
|
||||||
default-language:
|
default-language:
|
||||||
Haskell2010
|
Haskell2010
|
||||||
|
@ -205,7 +210,7 @@ executable brittany
|
||||||
}
|
}
|
||||||
|
|
||||||
test-suite unittests
|
test-suite unittests
|
||||||
if flag(brittany-dev-lib) {
|
if flag(brittany-dev-lib) || !flag(brittany-test-perf) {
|
||||||
buildable: False
|
buildable: False
|
||||||
} else {
|
} else {
|
||||||
buildable: True
|
buildable: True
|
||||||
|
|
Loading…
Reference in New Issue