diff --git a/Makefile b/Makefile index 9a26a505c..7d544a3a9 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,10 @@ TESTS=$(shell find tests/ -type f -name '*.egg' -not -name '*repro-*') WWW=${PWD}/target/www +# Keep release-mode test builds checking debug assertions without changing the +# normal release profile used by CodSpeed benchmarks and production binaries. +TEST_PROFILE_ENV=CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS=true + all: test nits docs # Build egglog and benchmark every tests/*.egg file with hyperfine, writing an @@ -18,14 +22,14 @@ nightly: nightly/.venv/bin/python scripts/nightly_bench.py test: doctest - cargo insta test --test-runner nextest --release --workspace --unreferenced reject + $(TEST_PROFILE_ENV) cargo insta test --test-runner nextest --release --workspace --unreferenced reject coverage: - cargo llvm-cov nextest --release --workspace --lcov --output-path lcov.info + $(TEST_PROFILE_ENV) cargo llvm-cov nextest --release --workspace --lcov --output-path lcov.info # Note: doctests are not included in coverage reports doctest: - cargo test --doc --release --workspace + $(TEST_PROFILE_ENV) cargo test --doc --release --workspace nits: