summaryrefslogtreecommitdiff
path: root/tests/lib/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Makefile.inc')
-rw-r--r--tests/lib/Makefile.inc32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/lib/Makefile.inc b/tests/lib/Makefile.inc
index 45cef1b4ca..44679eb08a 100644
--- a/tests/lib/Makefile.inc
+++ b/tests/lib/Makefile.inc
@@ -32,6 +32,10 @@ tests-y += spd_cache-ddr3-test
tests-y += spd_cache-ddr4-test
tests-y += cbmem_stage_cache-test
tests-y += libgcc-test
+tests-y += cbfs-verification-no-sha512-test
+tests-y += cbfs-verification-has-sha512-test
+tests-y += cbfs-no-verification-no-sha512-test
+tests-y += cbfs-no-verification-has-sha512-test
string-test-srcs += tests/lib/string-test.c
string-test-srcs += src/lib/string.c
@@ -176,3 +180,31 @@ cbmem_stage_cache-test-srcs += src/lib/imd.c
cbmem_stage_cache-test-config += CONFIG_CBMEM_STAGE_CACHE=1
libgcc-test-srcs += tests/lib/libgcc-test.c
+
+# CBFS varification tests are compiled with CONFIG_CBFS_VERIFICATION
+# and VB2_SUPPORT_SHA512 set and unset. Code should work with and without
+# verification and with hash structure of different sizes.
+cbfs-verification-no-sha512-test-stage := bootblock
+cbfs-verification-no-sha512-test-srcs := tests/lib/cbfs-verification-test.c \
+ tests/stubs/console.c \
+ tests/stubs/die.c \
+ tests/mock/cbfs_file_mock.c \
+ src/lib/cbfs.c \
+ src/commonlib/bsd/cbfs_private.c \
+ src/commonlib/mem_pool.c \
+ src/commonlib/region.c
+cbfs-verification-no-sha512-test-mocks += cbfs_get_boot_device cbfs_lookup
+cbfs-verification-no-sha512-test-config += CONFIG_COLLECT_TIMESTAMPS=0 \
+ CONFIG_CBFS_VERIFICATION=1 \
+ CONFIG_NO_CBFS_MCACHE=1 \
+ VB2_SUPPORT_SHA512=0
+
+$(call copy-test,cbfs-verification-no-sha512-test,cbfs-verification-has-sha512-test)
+cbfs-verification-has-sha512-test-config += VB2_SUPPORT_SHA512=1
+
+$(call copy-test,cbfs-verification-no-sha512-test,cbfs-no-verification-no-sha512-test)
+cbfs-no-verification-no-sha512-test-config += CONFIG_CBFS_VERIFICATION=0
+
+$(call copy-test,cbfs-verification-no-sha512-test,cbfs-no-verification-has-sha512-test)
+cbfs-no-verification-has-sha512-test-config += CONFIG_CBFS_VERIFICATION=0 \
+ VB2_SUPPORT_SHA512=1