Skip to content

Commit 64470ba

Browse files
committed
;make *buildtest*: skip tests/benchmarks, save a little time & noise
[ci skip]
1 parent aa47d8d commit 64470ba

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ test: pkgtest functest \
381381
# For quieter tests add --silent. It may hide troubleshooting info.
382382
# For very verbose tests add --verbosity=debug. It seems hard to get something in between.
383383
STACKTEST=$(STACK) test
384+
# When doing build testing, save a little time and output noise by not
385+
# running tests & benchmarks. Comment this out if you want to run them.
386+
SKIPTESTSBENCHS=--no-run-tests --no-run-benchmarks
384387

385388
buildplantest: $(call def-help,buildplantest, stack build --dry-run all hledger packages ensuring an install plan with default snapshot) \
386389
buildplantest-stack.yaml
@@ -398,7 +401,7 @@ buildtest-all: $(call def-help,buildtest-all, force-rebuild all hledger packages
398401
for F in stack-*.yaml stack.yaml; do make --no-print-directory buildtest-$$F; done
399402

400403
buildtest-%: $(call def-help,buildtest-STACKFILE, force-rebuild all hledger packages/modules quickly ensuring no warnings with the given stack yaml file; eg make buildtest-stack-ghc8.2.yaml )
401-
$(STACK) build --test --bench --fast --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror --stack-yaml=$*
404+
$(STACK) build --test --bench $(SKIPTESTSBENCHS) --fast --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror --stack-yaml=$*
402405

403406
incr-buildtest: $(call def-help,incr-buildtest, build any outdated hledger packages/modules quickly ensuring no warnings with default snapshot. Wont detect warnings in up-to-date modules.) \
404407
incr-buildtest-stack.yaml
@@ -407,7 +410,7 @@ incr-buildtest-all: $(call def-help,incr-buildtest-all, build any outdated hledg
407410
for F in stack-*.yaml stack.yaml; do make --no-print-directory incr-buildtest-$$F; done
408411

409412
incr-buildtest-%: $(call def-help,incr-buildtest-STACKFILE, build any outdated hledger packages/modules quickly ensuring no warnings with the stack yaml file; eg make buildtest-stack-ghc8.2.yaml. Wont detect warnings in up-to-date modules. )
410-
$(STACK) build --test --bench --fast --ghc-options=-Werror --stack-yaml=$*
413+
$(STACK) build --test --bench $(SKIPTESTSBENCHS) --fast --ghc-options=-Werror --stack-yaml=$*
411414

412415
pkgtest: $(call def-help,pkgtest, run the test suites in each package )
413416
@($(STACKTEST) && echo $@ PASSED) || (echo $@ FAILED; false)

0 commit comments

Comments
 (0)