From aae621d6c52467bb814b12d73a1851463d9b4a58 Mon Sep 17 00:00:00 2001 From: Chris Chen Date: Wed, 6 Jul 2016 14:07:00 -0700 Subject: cts: First patch flashes blank tests The first time you use this with a particular th, connect only th and run ./cts.py --th Then connect both boards and you can run ./cts.py to build/flash both boards. BRANCH=None BUG=None TEST=manual - Enter chroot - Navigate to ec/cts - Connect only th - 'sudo ./cts.py --th' - './cts.py -b' - Exit chroot - Connect both boards - './cts.py -f' Each board should flash successfully Change-Id: Ib14fccabcd9fdad04f9b92817da597bc0dcb3d89 Reviewed-on: https://chromium-review.googlesource.com/358100 Commit-Ready: Chris Chen Tested-by: Chris Chen Reviewed-by: Daisuke Nojiri --- Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4a8d2fe33f..ac296ad6dd 100644 --- a/Makefile +++ b/Makefile @@ -65,10 +65,16 @@ ifeq "$(TEST_BUILD)" "y" -D"TASK_NOTEST(n, r, d, s)=" -D"TASK_ALWAYS(n, r, d, s)=n" \ -D"TASK_TEST(n, r, d, s)=n" -imacros $(_tsk_lst_file) \ -imacros $(PROJECT).tasklist) +else ifdef CTS_MODULE + _tsk_lst_file:=$(PROJECT).tasklist + _tsk_lst:=$(shell echo "CONFIG_TASK_LIST" | $(CPP) -P \ + -I$(BDIR) -D"TASK_NOTEST(n, r, d, s)=n" -D"TASK_CTS(n, r, d, s)=n" \ + -D"TASK_ALWAYS(n, r, d, s)=n" -imacros $(_tsk_lst_file)) else _tsk_lst_file:=$(PROJECT).tasklist _tsk_lst:=$(shell echo "CONFIG_TASK_LIST" | $(CPP) -P \ -I$(BDIR) -D"TASK_NOTEST(n, r, d, s)=n" \ + -D"TASK_CTS(n, r, d, s)=" \ -D"TASK_ALWAYS(n, r, d, s)=n" -imacros $(_tsk_lst_file)) endif _tsk_cfg:=$(foreach t,$(_tsk_lst) ,HAS_TASK_$(t)) @@ -111,6 +117,10 @@ objs_from_dir=$(foreach obj, $($(2)-y), $(1)/$(obj)) # Get build configuration from sub-directories # Note that this re-includes the board and chip makefiles + +ifdef CTS_MODULE +include cts/build.mk +endif include $(BDIR)/build.mk include chip/$(CHIP)/build.mk include core/$(CORE)/build.mk @@ -139,8 +149,11 @@ endif all-obj-y+=$(call objs_from_dir,common,common) all-obj-y+=$(call objs_from_dir,driver,driver) all-obj-y+=$(call objs_from_dir,power,power) +ifdef CTS_MODULE +all-obj-y+=$(call objs_from_dir,cts,cts) +endif all-obj-y+=$(call objs_from_dir,test,$(PROJECT)) -dirs=core/$(CORE) chip/$(CHIP) $(BDIR) common power test +dirs=core/$(CORE) chip/$(CHIP) $(BDIR) common power test cts/common cts/$(CTS_MODULE) dirs+= private $(PDIR) dirs+=$(shell find driver -type d) common_dirs=util -- cgit v1.2.1