diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2018-05-25 06:21:45 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-26 00:21:41 -0700 |
commit | 920d4bc14b082f1cbd8635134f8d22a94c4afb28 (patch) | |
tree | c5fe41e04b657740b77a40333d891372c2624324 | |
parent | 5c5eba404c9ec8c1d728f5f6691a110aea1efbb0 (diff) | |
download | chrome-ec-920d4bc14b082f1cbd8635134f8d22a94c4afb28.tar.gz |
Makefile.rules: Add buildalltests target
In rare cases, it is useful to be able to build tests for all boards:
buildall only builds the main image, but -paladin builders also builds
test cases for each board.
Also remove/fix tests for boards that currently fail.
BRANCH=none
BUG=b:35647963
TEST=make buildalltests -j, wait a long time, tests pass.
Change-Id: Id6d978705a40a2045731cb08ad2ca5d62cc12ebb
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1072218
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | Makefile.rules | 17 | ||||
-rw-r--r-- | board/pdeval-stm32f072/ec.tasklist | 2 | ||||
-rw-r--r-- | board/reef_it8320/board.c | 2 | ||||
-rw-r--r-- | board/rowan/ec.tasklist | 2 | ||||
-rw-r--r-- | board/strago/ec.tasklist | 2 | ||||
-rw-r--r-- | test/build.mk | 11 |
6 files changed, 31 insertions, 5 deletions
diff --git a/Makefile.rules b/Makefile.rules index a46006c51e..320cc7ec27 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -154,6 +154,17 @@ buildall: build_boards @touch .tests-passed @echo "$@ completed successfully!" +.PHONY: try_build_tests +try_build_tests: $(foreach b, $(BOARDS), tests-$(b)) + +.PHONY: buildalltests +buildalltests: + @rm -rf $(FAILED_BOARDS_DIR) + @mkdir $(FAILED_BOARDS_DIR) + @for b in $(BOARDS); do echo 'starting' > $(FAILED_BOARDS_DIR)/$$b; done + $(MAKE) try_build_tests + @echo "$@ completed successfully!" + showboards: @echo $(sort $(boards)) @@ -174,6 +185,12 @@ proj-%: $(MAKE) --no-print-directory BOARD=$* V=$(V) @rm $(FAILED_BOARDS_DIR)/$* +tests-%: + @echo 'building tests' > $(FAILED_BOARDS_DIR)/$* + @echo "======= building $* tests" + $(MAKE) --no-print-directory BOARD=$* V=$(V) tests + @rm $(FAILED_BOARDS_DIR)/$* + dis-y := $(out)/RW/$(PROJECT).RW.dis dis-$(CONFIG_FW_INCLUDE_RO) += $(out)/RO/$(PROJECT).RO.dis dis-$(CONFIG_SHAREDLIB) += $(out)/$(SHOBJLIB)/$(SHOBJLIB).dis diff --git a/board/pdeval-stm32f072/ec.tasklist b/board/pdeval-stm32f072/ec.tasklist index f58f5e3a7c..4262727041 100644 --- a/board/pdeval-stm32f072/ec.tasklist +++ b/board/pdeval-stm32f072/ec.tasklist @@ -18,6 +18,6 @@ */ #define CONFIG_TASK_LIST \ TASK_ALWAYS(HOOKS, hook_task, NULL, TASK_STACK_SIZE) \ - TASK_NOTEST(PDCMD, pd_command_task,NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(PDCMD, pd_command_task,NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(PD_C0, pd_task, NULL, LARGER_TASK_STACK_SIZE) diff --git a/board/reef_it8320/board.c b/board/reef_it8320/board.c index 490d5c05f8..950f504d42 100644 --- a/board/reef_it8320/board.c +++ b/board/reef_it8320/board.c @@ -136,6 +136,7 @@ static int hc_pd_host_event_status(struct host_cmd_handler_args *args) DECLARE_HOST_COMMAND(EC_CMD_PD_HOST_EVENT_STATUS, hc_pd_host_event_status, EC_VER_MASK(0)); +#if defined(HAS_TASK_HOSTCMD) && !defined(TEST_BUILD) /* Send host event up to AP */ void pd_send_host_event(int mask) { @@ -147,6 +148,7 @@ void pd_send_host_event(int mask) /* interrupt the AP */ host_set_single_event(EC_HOST_EVENT_PD_MCU); } +#endif const enum gpio_signal hibernate_wake_pins[] = { GPIO_AC_PRESENT, diff --git a/board/rowan/ec.tasklist b/board/rowan/ec.tasklist index 672efd1a23..5572afe63e 100644 --- a/board/rowan/ec.tasklist +++ b/board/rowan/ec.tasklist @@ -25,6 +25,6 @@ TASK_NOTEST(PDCMD, pd_command_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(HOSTCMD, host_command_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_NOTEST(MOTIONSENSE, motion_sense_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(MOTIONSENSE, motion_sense_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(PD_C0, pd_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(ALS, als_task, NULL, TASK_STACK_SIZE) diff --git a/board/strago/ec.tasklist b/board/strago/ec.tasklist index 9f3ed29b08..8bfbd24c21 100644 --- a/board/strago/ec.tasklist +++ b/board/strago/ec.tasklist @@ -21,7 +21,7 @@ TASK_ALWAYS(ALS, als_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(USB_CHG_P0, usb_charger_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(CHARGER, charger_task, NULL, TASK_STACK_SIZE) \ - TASK_NOTEST(MOTIONSENSE, motion_sense_task, NULL, LARGER_TASK_STACK_SIZE) \ + TASK_ALWAYS(MOTIONSENSE, motion_sense_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_NOTEST(CHIPSET, chipset_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(PDCMD, pd_command_task, NULL, TASK_STACK_SIZE) \ diff --git a/test/build.mk b/test/build.mk index dd840f7802..8853042de6 100644 --- a/test/build.mk +++ b/test/build.mk @@ -17,14 +17,21 @@ test-list-$(BOARD_HAMMER)+=entropy rsa3 # compile with it. Disable them for now. test-list-$(BOARD_SAMUS)= -# So does Cr50 -test-list-$(BOARD_CR50)= +# So does anything that runs on chip/g +ifneq ($(CHIP_G),) +test-list-y= +endif + +# Hadoken does not support scratchpad +test-list-$(BOARD_HADOKEN)= # For some tests, we are running out of RAM. Disable them for now. test-list-$(BOARD_GLADOS_PD)= test-list-$(BOARD_CHELL_PD)= test-list-$(BOARD_OAK_PD)= test-list-$(BOARD_SAMUS_PD)= +test-list-$(BOARD_COFFEECAKE)= +test-list-$(BOARD_SERVO_V4)= # Emulator tests ifneq ($(TEST_LIST_HOST),) |