From dff3b9f2c0420a1f0889099f8e89b81fe5209313 Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Sun, 28 Apr 2013 14:44:07 +0800 Subject: Make test-list a per-board parameter Some tests are not applicable to all boards. This change makes test-list a per-board parameter so a test can be enabled/disabled for individual boards. Also disable all the tests that don't compile now. BUG=chrome-os-partner:18598 TEST=make tests for all boards BRANCH=None Change-Id: Id2d18e23856f5c64dbdc7c6ca5949f8ad61b5cc0 Signed-off-by: Vic Yang Reviewed-on: https://gerrit.chromium.org/gerrit/49452 --- Makefile | 1 + Makefile.rules | 4 ++-- test/build.mk | 19 ++++++++++++++++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 2af1aa662f..485a4f9f8a 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,7 @@ _flag_cfg:=$(shell $(CPP) $(CPPFLAGS) -P -dN chip/$(CHIP)/config.h | \ $(shell $(CPP) $(CPPFLAGS) -P -dN board/$(BOARD)/board.h | \ grep -o "CONFIG_.*") $(foreach c,$(_tsk_cfg) $(_flag_cfg),$(eval $(c)=y)) +$(eval BOARD_$(BOARD)=y) # Get build configuration from sub-directories -include private/build.mk diff --git a/Makefile.rules b/Makefile.rules index c6868ecf37..9a1f986f35 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -55,8 +55,8 @@ dis: $(dis-y) utils: $(build-utils) $(host-utils) -test-targets=$(foreach t,$(test-list),test-$(t)) -qemu-test-targets=$(foreach t,$(test-list),qemu-$(t)) +test-targets=$(foreach t,$(test-list-y),test-$(t)) +qemu-test-targets=$(foreach t,$(test-list-y),qemu-$(t)) .PHONY: $(qemu-test-target) $(test-targets) $(test-targets): test-%: diff --git a/test/build.mk b/test/build.mk index 6155285cb7..ead4deab75 100644 --- a/test/build.mk +++ b/test/build.mk @@ -6,11 +6,24 @@ # on-board test binaries build # -test-list=pingpong timer_calib timer_dos timer_jump mutex thermal -test-list+=power_button kb_scan scancode typematic charging flash -test-list+=stress utils +test-list-y=pingpong timer_calib timer_dos timer_jump mutex utils #disable: powerdemo +# TODO(victoryang): Fix these tests: +# thermal power_button scancode typematic charging + +test-list-$(BOARD_bds)+= +test-list-$(BOARD_daisy)+=kb_scan flash stress +test-list-$(BOARD_mccroskey)+=flash +test-list-$(BOARD_pit)+=kb_scan flash stress +test-list-$(BOARD_snow)+=kb_scan flash stress +test-list-$(BOARD_spring)+=kb_scan flash stress + +# Disable x86 boards until they compiles +# TODO(victoryang): Fix them +test-list-$(BOARD_link)= +test-list-$(BOARD_slippy)= + flash-y=flash.o kb_scan-y=kb_scan.o mutex-y=mutex.o -- cgit v1.2.1