summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYicheng Li <yichengli@chromium.org>2020-01-22 13:09:01 -0800
committerCommit Bot <commit-bot@chromium.org>2020-02-04 09:23:28 +0000
commit5f3a97a9401dcd86705c4e00632cf06c684425f4 (patch)
tree03cf26aeb9111073db07fbb2a86a702f4bea5c62
parentefac8816d6d6a5617bfede0cac4e284fabb2ce26 (diff)
downloadchrome-ec-5f3a97a9401dcd86705c4e00632cf06c684425f4.tar.gz
Link libcryptoc to on-device tests if needed
If a board has CONFIG_LIBCRYPTOC, the on-device tests for that board should have libcryptoc linked, otherwise building the on-device tests will fail. BRANCH=nocturne BUG=b:146059617 TEST=make -j BOARD=nocturne_fp tests (Flash build/nocturne_fp/test-aes.bin to device) (Connect to UART console) runtest (Repeat for test-sha256.bin, test-sha256-unrolled.bin) TEST=make -j BOARD=hatch_fp tests (Flash build/hatch_fp/test-aes.bin to nucleo-f412zg device) (Since it's nucleo I changed the UART config when building) (Connect to UART console) runtest (Repeat for test-sha256.bin, test-sha256-unrolled.bin) Change-Id: Ifb9f9fa562066224e305b78f3525282bb1da3c0a Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2018057 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
-rw-r--r--common/build.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/build.mk b/common/build.mk
index 35aa626809..82ca3cb00f 100644
--- a/common/build.mk
+++ b/common/build.mk
@@ -298,6 +298,11 @@ $(out)/RW/ec.RW.elf $(out)/RW/ec.RW_B.elf: $(out)/cryptoc/libcryptoc.a
# Host test executables (including fuzz tests).
$(out)/$(PROJECT).exe: LDFLAGS_EXTRA += $(CRYPTOC_LDFLAGS)
$(out)/$(PROJECT).exe: $(out)/cryptoc/libcryptoc.a
+# On-device tests.
+test-targets=$(foreach test,$(test-list-y),\
+ $(out)/RW/$(test).RW.elf $(out)/RO/$(test).RO.elf)
+$(test-targets): LDFLAGS_EXTRA += $(CRYPTOC_LDFLAGS)
+$(test-targets): $(out)/cryptoc/libcryptoc.a
endif
include $(_common_dir)fpsensor/build.mk