Skip to content

Commit

Permalink
;make *buildtest*: skip tests/benchmarks, save a little time & noise
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
simonmichael committed Dec 28, 2019
1 parent aa47d8d commit 64470ba
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ test: pkgtest functest \
# For quieter tests add --silent. It may hide troubleshooting info.
# For very verbose tests add --verbosity=debug. It seems hard to get something in between.
STACKTEST=$(STACK) test
# When doing build testing, save a little time and output noise by not
# running tests & benchmarks. Comment this out if you want to run them.
SKIPTESTSBENCHS=--no-run-tests --no-run-benchmarks

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

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 )
$(STACK) build --test --bench --fast --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror --stack-yaml=$*
$(STACK) build --test --bench $(SKIPTESTSBENCHS) --fast --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror --stack-yaml=$*

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.) \
incr-buildtest-stack.yaml
Expand All @@ -407,7 +410,7 @@ incr-buildtest-all: $(call def-help,incr-buildtest-all, build any outdated hledg
for F in stack-*.yaml stack.yaml; do make --no-print-directory incr-buildtest-$$F; done

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. )
$(STACK) build --test --bench --fast --ghc-options=-Werror --stack-yaml=$*
$(STACK) build --test --bench $(SKIPTESTSBENCHS) --fast --ghc-options=-Werror --stack-yaml=$*

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

0 comments on commit 64470ba

Please sign in to comment.