summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2021-09-15 15:44:06 +0800
committerCommit Bot <commit-bot@chromium.org>2021-09-17 12:54:59 +0000
commitff416f58a0bc7ac25871085b0adb0078a684f1c5 (patch)
tree1304b4e637cf80c724dda4abb9024d651f4c11ca
parenta23fd3c3bc50213c878f81f59fcd6c7da328aa43 (diff)
downloadvboot-ff416f58a0bc7ac25871085b0adb0078a684f1c5.tar.gz
vboot: Allow enabling unit test console output
By passing TEST_PRINT=1 to make, VBOOT_DEBUG symbol will be defined and hence cause the stub vb2ex_printf() to print to stderr. Note that DEBUG=1 will also imply VBOOT_DEBUG as before. BUG=none TEST=make clean && TEST_PRINT=0 make run2tests TEST=make clean && TEST_PRINT=1 make run2tests BRANCH=none Change-Id: I39353f7fdec0167aa054501bda9d6e23bf66b732 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3161533 Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index acc9adf2..70ef346e 100644
--- a/Makefile
+++ b/Makefile
@@ -171,7 +171,7 @@ COMMON_FLAGS += $(call test_ccflag,-Wno-unknown-warning)
# Needs -Wl because LD is actually set to CC by default.
LDFLAGS += -Wl,--gc-sections
-ifneq (${DEBUG},)
+ifneq (${DEBUG}$(filter-out 0,${TEST_PRINT}),)
CFLAGS += -DVBOOT_DEBUG
endif