summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAllen Webb <allenwebb@google.com>2018-08-17 11:31:39 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-08-22 16:02:19 -0700
commit625acc6b7c7455b0f7c6ad49f467737ce64b37eb (patch)
treef9786735eb02c8e448ddcd02718ca4b833b9278a /Makefile
parent26708ffa05ee1fc88bd754ddb959499acea1c41d (diff)
downloadchrome-ec-625acc6b7c7455b0f7c6ad49f467737ce64b37eb.tar.gz
Move fuzzing tests into a fuzz subfolder.
BRANCH=none CQ-DEPEND=CL:*664115 BUG=chromium:876582 TEST=make -j buildall && make -j buildfuzztests Change-Id: Iade5e5138f495e6b3b99ec16f1a467861ade5537 Signed-off-by: Allen Webb <allenwebb@google.com> Reviewed-on: https://chromium-review.googlesource.com/1180179 Reviewed-by: Mattias Nissler <mnissler@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index dcd8944a83..cc3a773e10 100644
--- a/Makefile
+++ b/Makefile
@@ -91,13 +91,14 @@ UC_PROJECT:=$(call uppercase,$(PROJECT))
# Transform the configuration into make variables. This must be done after
# the board/baseboard/project/chip/core variables are defined, since some of
# the configs are dependent on particular configurations.
-includes=include core/$(CORE)/include $(dirs) $(out) test
+includes=include core/$(CORE)/include $(dirs) $(out) fuzz test
ifdef CTS_MODULE
includes+=cts/$(CTS_MODULE) cts
endif
ifeq "$(TEST_BUILD)" "y"
_tsk_lst_file:=ec.tasklist
- _tsk_lst_flags:=-Itest -DTEST_BUILD -imacros $(PROJECT).tasklist
+ _tsk_lst_flags:=$(if $(TEST_FUZZ),-Ifuzz,-Itest) -DTEST_BUILD -imacros \
+ $(PROJECT).tasklist
else ifdef CTS_MODULE
_tsk_lst_file:=ec.tasklist
_tsk_lst_flags:=-I cts/$(CTS_MODULE) -Icts -DCTS_MODULE=$(CTS_MODULE) \
@@ -195,6 +196,7 @@ include chip/$(CHIP)/build.mk
include core/$(CORE)/build.mk
include common/build.mk
include driver/build.mk
+include fuzz/build.mk
include power/build.mk
-include private/build.mk
ifneq ($(PDIR),)
@@ -226,14 +228,18 @@ all-obj-$(1)+=$(call objs_from_dir_p,power,power,$(1))
ifdef CTS_MODULE
all-obj-$(1)+=$(call objs_from_dir_p,cts,cts,$(1))
endif
+ifeq ($(TEST_FUZZ),y)
+all-obj-$(1)+=$(call objs_from_dir_p,fuzz,$(PROJECT),$(1))
+else
all-obj-$(1)+=$(call objs_from_dir_p,test,$(PROJECT),$(1))
+endif
endef
# Get all sources to build
$(eval $(call get_sources,y))
$(eval $(call get_sources,ro))
-dirs=core/$(CORE) chip/$(CHIP) $(BASEDIR) $(BDIR) common power test \
+dirs=core/$(CORE) chip/$(CHIP) $(BASEDIR) $(BDIR) common fuzz power test \
cts/common cts/$(CTS_MODULE)
dirs+= private $(PDIR)
dirs+=$(shell find common -type d)