@@ -13,25 +13,32 @@ source $SCRIPT_DIR/targets.sh
1313print_help () {
1414 echo "Usage: $0 "
1515 echo " [--targets <"target1 target2 ..." | help>]"
16+ echo
17+ echo " [--quick]"
1618 echo " [--with-compiler <compiler exe name>]"
1719 echo " [--cabal-build-options <option>]"
1820 echo " [--dev-build]"
21+ echo
1922 echo " [--coverage]"
2023 echo " [--hpc-report-options <option>]"
2124 echo " [--no-measure]"
2225 echo " [--raw]"
26+ echo
2327 echo " [--rtsopts <option>]"
2428 echo " -- <hspec options or test names>"
2529 echo
2630 echo "--targets: targets to run, use 'help' for list of targets"
31+ echo
32+ echo "--quick: disable optimizations to build quickly"
2733 echo "--cabal-build-options: Pass any cabal build options to be used for build"
2834 echo "--dev-build: runs some additional tests"
35+ echo
2936 echo "--coverage: enable coverage and report coverage info"
3037 echo "--hpc-report-options: option for 'hpc report'"
3138 echo "--no-measure: with --coverage, do not run tests, only show coverage info"
3239 echo "--raw: with --coverage, do not run hpc"
33− echo "--rtsopts: pass GHC RTS options to the test executable"
3440 echo
41+ echo "--rtsopts: pass GHC RTS options to the test executable"
3542 echo "Any arguments after a '--' are passed directly to hspec"
3643 exit
3744}
@@ -65,7 +72,7 @@ do
6572 # flags
6673 --raw) RAW=1; shift ;;
6774 #--slow) SLOW=1; shift ;; # not implemented
68− #--quick) QUICK_MODE=1; shift ;; # not implemented
75+ --quick) TEST_QUICK_MODE=1; shift ;;
6976 --dev-build) RUNNING_DEVBUILD=1 CABAL_BUILD_OPTIONS+=" --flag dev"; shift ;;
7077 --coverage) COVERAGE=1; shift ;;
7178 --no-measure) MEASURE=0; shift ;;
@@ -78,6 +85,11 @@ TARGET_EXE_ARGS=$*
7885
7986set_derived_vars
8087
88+if test "$TEST_QUICK_MODE" -eq 1
89+then
90+ CABAL_BUILD_OPTIONS+=" --disable-optimization --flags -opt"
91+fi
92+
8193#-----------------------------------------------------------------------------
8294# Determine targets
8395#-----------------------------------------------------------------------------
@@ -174,6 +186,7 @@ run_target () {
174186 local extra_args=$4
175187
176188 local target_prog
189+
177190 target_prog=$(cabal_target_prog $package_name $component $target_name) || \
178191 die "Cannot find executable for target $target_name"
179192