diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-02-22 14:43:59 +0100 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-13 12:38:16 +0200 |
commit | a167dac4fb390a82001d670f1b0a886df7b7fa51 (patch) | |
tree | 99d554454eaef483cd13b72fa45e479b6f13021b /Makefile | |
parent | 5b31c8bbf2dd0e0971fc22a8c21a6578a0c47fbf (diff) |
bench, ci: Run benchmark functions as tests.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -69,6 +69,12 @@ build: .PHONY: test check test check: CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) $(CARGO) test $(CARGO_FLAGS) $(CARGO_PACKAGES) $(CARGO_TEST_ARGS) + if echo "$(CARGO_TEST_ARGS)" | grep -q -e '--benches'; \ + then \ + echo 'Already tested the benchmarks.'; \ + else \ + CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) $(CARGO) test $(CARGO_FLAGS) $(CARGO_PACKAGES) --benches; \ + fi if echo "$(CARGO_PACKAGES)" | grep -q -E -e '(^| )[-]p +.'; \ then \ echo 'WARNING: Not running other tests, because $$CARGO_PACKAGES specifies a package.'; \ |