summaryrefslogtreecommitdiff
path: root/tests/Makefile.common
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Makefile.common')
-rw-r--r--tests/Makefile.common8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/Makefile.common b/tests/Makefile.common
index 5cb7b25b59..ace16d2dd2 100644
--- a/tests/Makefile.common
+++ b/tests/Makefile.common
@@ -51,7 +51,13 @@ TEST_CFLAGS += -Wno-unknown-warning-option -Wno-source-mgr -Wno-main-return-type
TEST_CFLAGS += -Wno-array-compare -Wno-packed-not-aligned -Wno-trigraphs
TEST_CFLAGS += -Wno-unused-but-set-variables
-TEST_CFLAGS += -std=gnu11 -Os -ffunction-sections -fdata-sections -fno-builtin
+TEST_CFLAGS += -std=gnu11 -ffunction-sections -fdata-sections -fno-builtin
+
+ifneq ($(filter-out 0,$(DEBUG)),)
+TEST_CFLAGS += -Og -ggdb3
+else
+TEST_CFLAGS += -Os
+endif
TEST_CFLAGS += -D__TEST__