Skip to content

Commit 048e740

Browse files
committed
Makefile: make unit test SANITIZE_* configurable
To build the unit tests without sanitizers, call `make unit-test SANITIZE=OFF`. On my machine I can't run sanitizers for some reason, so this is a workaround. It still defaults to ON, and the CI will keep using the sanitizers.
1 parent 80fc55b commit 048e740

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# This makefile is used as a command runner and not for tracking dependencies between recipies
1616

1717
.DEFAULT_GOAL := firmware
18+
SANITIZE ?= ON
1819

1920
bootstrap:
2021
git submodule update --init --recursive
@@ -26,7 +27,7 @@ build/Makefile:
2627

2728
build-build/Makefile:
2829
mkdir -p build-build
29-
cd build-build && cmake .. -DCOVERAGE=ON -DSANITIZE_ADDRESS=ON -DSANITIZE_UNDEFINED=ON
30+
cd build-build && cmake .. -DCOVERAGE=ON -DSANITIZE_ADDRESS=$(SANITIZE) -DSANITIZE_UNDEFINED=$(SANITIZE)
3031
$(MAKE) -C py/bitbox02
3132

3233
# Should only be used for rust unit tests since we didn't add support to

0 commit comments

Comments
 (0)