mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
cts: Build CTS suites in buildall
We need to (at least) build CTS for all boards & suites supported by CTS. This will prevent our investment from accidentally being broken. BUG=chromium:627252 BRANCH=none TEST=make buildall builds CTS suites Change-Id: Ib7bceaafd5e27ce9285b9d1bf35339bf6b04ba72 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/359947
This commit is contained in:
committed by
chrome-bot
parent
49312e06cd
commit
b6e7520da4
@@ -100,6 +100,7 @@ buildall:
|
||||
@mkdir $(FAILED_BOARDS_DIR)
|
||||
@for b in $(boards); do echo 'starting' > $(FAILED_BOARDS_DIR)/$$b; done
|
||||
$(MAKE) try_buildall
|
||||
$(MAKE) build_cts
|
||||
$(MAKE) runtests
|
||||
@touch .tests-passed
|
||||
@echo "$@ completed successfully!"
|
||||
@@ -175,6 +176,44 @@ $(run-test-targets): run-%: host-%
|
||||
hosttests: $(host-test-targets)
|
||||
runtests: $(run-test-targets)
|
||||
|
||||
# Automatically enumerate all suites.
|
||||
cts_excludes := common
|
||||
cts_suites := $(filter-out $(cts_excludes), \
|
||||
$(shell find cts -maxdepth 1 -mindepth 1 -type d -printf "%f "))
|
||||
|
||||
# Add boards below as CTS is expanded.
|
||||
cts_boards := stm32l476g-eval nucleo-f072rb
|
||||
|
||||
.PHONY: build_cts
|
||||
|
||||
# Create CTS rule automatically for given suite and board
|
||||
# $1: suite name
|
||||
# $2: board name
|
||||
# $3: suite name used in the previous loop
|
||||
define make-cts =
|
||||
ifneq ($$(filter $(1),$$(cts_suites)),)
|
||||
ifneq ($$(filter $(3),$$(cts_suites)),)
|
||||
# Serialize builds
|
||||
cts-$(1)-$(2): cts-$(3)-$(2)
|
||||
endif
|
||||
build_cts: cts-$(1)-$(2)
|
||||
cts-$(1)-$(2):
|
||||
$$(MAKE) CTS_MODULE=$(1) BOARD=$(2)
|
||||
endif
|
||||
# Do not remove this blank line
|
||||
|
||||
endef
|
||||
|
||||
# Create rules for all cts-suite-board combinations. Additionally, we serialize
|
||||
# targets per board: cts-x-board -> cts-y-board -> ...
|
||||
# If we don't serialize targets, parallel make fails because all suites
|
||||
# try to produce ec.bin in the same directory (e.g. build/stm32l476g-eval).
|
||||
$(foreach b, $(cts_boards), \
|
||||
$(foreach s, $(cts_suites) none, \
|
||||
$(eval $(call make-cts,$(s),$(b),$(prev)) prev:=$(s)) \
|
||||
) \
|
||||
)
|
||||
|
||||
cov-test-targets=$(foreach t,$(test-list-host),build/host/$(t).info)
|
||||
bldversion=$(shell (./util/getversion.sh ; echo VERSION) | $(CPP) -P)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user