summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChris Chen <twothreecc@google.com>2016-07-06 14:07:00 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-07-09 01:41:01 -0700
commitaae621d6c52467bb814b12d73a1851463d9b4a58 (patch)
treea5d6e2ed469202d9ab3dc7680579f40916f2b5bd /Makefile
parent24abdc9a4e2dc056815feea2150b1d50f4d7c836 (diff)
downloadchrome-ec-aae621d6c52467bb814b12d73a1851463d9b4a58.tar.gz
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 <twothreecc@google.com> Tested-by: Chris Chen <twothreecc@google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 14 insertions, 1 deletions
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