aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.main1
-rw-r--r--core/test/Makefile.check2
-rw-r--r--core/test/run-device.c1
-rw-r--r--core/test/stubs.c2
-rw-r--r--hdata/test/stubs.c2
5 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.main b/Makefile.main
index 179ed11..098e593 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -39,6 +39,7 @@ HOSTCFLAGS += $(call try-cflag,$(HOSTCC),-Wjump-misses-init) \
$(call try-cflag,$(HOSTCC),-Wsuggest-attribute=const) \
$(call try-cflag,$(HOSTCC),-Wsuggest-attribute=noreturn) \
$(call try-cflag,$(HOSTCC),-Wstack-usage=1024)
+HOSTCFLAGS += -DDEBUG -DCCAN_LIST_DEBUG
VALGRIND=valgrind -q --show-reachable=yes --error-exitcode=99
diff --git a/core/test/Makefile.check b/core/test/Makefile.check
index cc3b47a..69abd01 100644
--- a/core/test/Makefile.check
+++ b/core/test/Makefile.check
@@ -17,6 +17,8 @@ CORE_TEST := core/test/run-device \
core/test/run-timebase \
core/test/run-timer
+HOSTCFLAGS+=-I . -I include
+
CORE_TEST_NOSTUB := core/test/run-console-log
CORE_TEST_NOSTUB += core/test/run-console-log-buf-overrun
CORE_TEST_NOSTUB += core/test/run-console-log-pr_fmt
diff --git a/core/test/run-device.c b/core/test/run-device.c
index 61ecf84..3da4a2f 100644
--- a/core/test/run-device.c
+++ b/core/test/run-device.c
@@ -31,7 +31,6 @@ static inline bool fake_is_rodata(const void *p)
#define zalloc(bytes) calloc((bytes), 1)
#include "../device.c"
-#include "../../ccan/list/list.c" /* For list_check */
#include <assert.h>
#include "../../test/dt_common.c"
diff --git a/core/test/stubs.c b/core/test/stubs.c
index 33a3385..39ff18d 100644
--- a/core/test/stubs.c
+++ b/core/test/stubs.c
@@ -17,6 +17,8 @@
#include <stdio.h>
#include <stdarg.h>
+#include "../../ccan/list/list.c"
+
void _prlog(int log_level __attribute__((unused)), const char* fmt, ...) __attribute__((format (printf, 2, 3)));
#ifndef pr_fmt
diff --git a/hdata/test/stubs.c b/hdata/test/stubs.c
index e72b683..9687b31 100644
--- a/hdata/test/stubs.c
+++ b/hdata/test/stubs.c
@@ -17,6 +17,8 @@
#include <stdio.h>
#include <stdarg.h>
+#include "../../ccan/list/list.c"
+
void _prlog(int log_level __attribute__((unused)), const char* fmt, ...) __attribute__((format (printf, 2, 3)));
#ifndef pr_fmt