test: build target test only when the full runtime is available

For targets not using the common runtime functions, the current test
content does not make much sense and fails to build properly :
de-activate the tests build in that case.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BRANCH=none
BUG=chrome-os-partner:28480
TEST=USE=usbpd emerge-samus chromeos-ec

Change-Id: Ic6477861b5a86916f29a9f6bb70ed0def3661886
Reviewed-on: https://chromium-review.googlesource.com/197883
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vic Yang <victoryang@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
Vincent Palatin
2014-05-01 14:21:16 -07:00
committed by chrome-internal-fetch
parent 3000fa71a6
commit 0f01a40c86

View File

@@ -82,12 +82,14 @@ utils: $(build-utils) $(host-utils)
test-targets=$(foreach t,$(test-list-y),test-$(t))
.PHONY: $(test-targets)
ifeq "$(CONFIG_COMMON_RUNTIME)" "y"
$(test-targets): test-%:
@set -e ; \
echo " BUILD $(out)/$*" ; \
$(MAKE) --no-print-directory BOARD=$(BOARD) PROJECT=$* \
V=$(V) out=$(out)/$* TEST_BUILD=y; \
cp $(out)/$*/$*.bin $(out)/test-$*.bin
endif
tests: $(test-targets)