1 # SPDX-License-Identifier: GPL-2.0-only
5 tests-y
+= b64_decode-test
6 tests-y
+= hexstrtobin-test
8 tests-y
+= timestamp-test
10 tests-y
+= cbmem_console-romstage-test
11 tests-y
+= cbmem_console-ramstage-test
13 tests-y
+= imd_cbmem-romstage-test
14 tests-y
+= imd_cbmem-ramstage-test
15 tests-y
+= region_file-test
17 tests-y
+= memset-test
18 tests-y
+= memcmp-test
19 tests-y
+= memchr-test
20 tests-y
+= memcpy-test
21 tests-y
+= malloc-test
22 tests-y
+= memmove-test
23 tests-y
+= crc_byte-test
24 tests-y
+= memrange-test
26 tests-y
+= bootmem-test
27 tests-y
+= dimm_info_util-test
28 tests-y
+= coreboot_table-test
30 tests-y
+= spd_cache-ddr3-test
31 tests-y
+= spd_cache-ddr4-test
32 tests-y
+= cbmem_stage_cache-test
33 tests-y
+= libgcc-test
34 tests-y
+= cbfs-verification-no-sha512-test
35 tests-y
+= cbfs-verification-has-sha512-test
36 tests-y
+= cbfs-no-verification-no-sha512-test
37 tests-y
+= cbfs-no-verification-has-sha512-test
38 tests-y
+= cbfs-lookup-no-mcache-test
39 tests-y
+= cbfs-lookup-has-mcache-test
41 tests-y
+= ux_locales-test
43 lib-test-srcs
+= tests
/lib
/lib-test.c
45 string-test-srcs
+= tests
/lib
/string-test.c
46 string-test-srcs
+= src
/lib
/string.c
48 b64_decode-test-srcs
+= tests
/lib
/b64_decode-test.c
49 b64_decode-test-srcs
+= tests
/stubs
/console.c
50 b64_decode-test-srcs
+= src
/lib
/b64_decode.c
52 hexstrtobin-test-srcs
+= tests
/lib
/hexstrtobin-test.c
53 hexstrtobin-test-srcs
+= src
/lib
/hexstrtobin.c
55 imd-test-srcs
+= tests
/lib
/imd-test.c
56 imd-test-srcs
+= tests
/stubs
/console.c
57 imd-test-srcs
+= src
/lib
/imd.c
58 imd-test-srcs
+= tests
/stubs
/die.c
60 timestamp-test-srcs
+= tests
/lib
/timestamp-test.c
61 timestamp-test-srcs
+= tests
/stubs
/timestamp.c
62 timestamp-test-srcs
+= tests
/stubs
/console.c
63 timestamp-test-stage
:= romstage
65 edid-test-srcs
+= tests
/lib
/edid-test.c
66 edid-test-srcs
+= src
/lib
/edid.c
67 edid-test-srcs
+= tests
/stubs
/console.c
69 cbmem_console-romstage-test-stage
:= romstage
70 cbmem_console-romstage-test-srcs
+= tests
/lib
/cbmem_console-test.c
71 cbmem_console-romstage-test-srcs
+= tests
/stubs
/console.c
73 cbmem_console-ramstage-test-stage
:= ramstage
74 cbmem_console-ramstage-test-srcs
+= tests
/lib
/cbmem_console-test.c
75 cbmem_console-ramstage-test-srcs
+= tests
/stubs
/console.c
77 fmap-test-srcs
+= tests
/lib
/fmap-test.c
78 fmap-test-srcs
+= src
/lib
/fmap.c
79 fmap-test-srcs
+= tests
/stubs
/console.c
80 fmap-test-srcs
+= src
/lib
/boot_device.c
81 fmap-test-srcs
+= src
/commonlib
/region.c
82 fmap-test-cflags
+= -I tests
/include/tests
/lib
/fmap
84 imd_cbmem-ramstage-test-stage
:= ramstage
85 imd_cbmem-ramstage-test-srcs
+= tests
/lib
/imd_cbmem-test.c
86 imd_cbmem-ramstage-test-srcs
+= tests
/stubs
/console.c
87 imd_cbmem-ramstage-test-srcs
+= src
/lib
/imd.c
88 imd_cbmem-ramstage-test-mocks
+= cbmem_top_chipset
89 imd_cbmem-ramstage-test-srcs
+= tests
/stubs
/die.c
91 imd_cbmem-romstage-test-stage
:= romstage
92 imd_cbmem-romstage-test-srcs
+= tests
/lib
/imd_cbmem-test.c
93 imd_cbmem-romstage-test-srcs
+= tests
/stubs
/console.c
94 imd_cbmem-romstage-test-srcs
+= src
/lib
/imd.c
95 imd_cbmem-romstage-test-mocks
+= cbmem_top_chipset
96 imd_cbmem-romstage-test-srcs
+= tests
/stubs
/die.c
98 region_file-test-srcs
+= tests
/lib
/region_file-test.c
99 region_file-test-srcs
+= src
/commonlib
/region.c
100 region_file-test-srcs
+= tests
/stubs
/console.c
102 stack-test-srcs
+= tests
/lib
/stack-test.c
103 stack-test-srcs
+= src
/lib
/stack.c
104 stack-test-srcs
+= tests
/stubs
/console.c
106 memset-test-srcs
+= tests
/lib
/memset-test.c
107 memset-test-srcs
+= src
/lib
/memset.c
109 memcmp-test-srcs
+= tests
/lib
/memcmp-test.c
111 memchr-test-srcs
+= tests
/lib
/memchr-test.c
112 memchr-test-srcs
+= src
/lib
/memchr.c
114 memcpy-test-srcs
+= tests
/lib
/memcpy-test.c
116 malloc-test-srcs
+= tests
/lib
/malloc-test.c
117 malloc-test-srcs
+= tests
/stubs
/console.c
119 memmove-test-srcs
+= tests
/lib
/memmove-test.c
121 crc_byte-test-srcs
+= tests
/lib
/crc_byte-test.c
122 crc_byte-test-srcs
+= src
/lib
/crc_byte.c
124 memrange-test-srcs
+= tests
/lib
/memrange-test.c
125 memrange-test-srcs
+= src
/lib
/memrange.c
126 memrange-test-srcs
+= tests
/stubs
/console.c
127 memrange-test-srcs
+= src
/device
/device_util.c
129 uuid-test-srcs
+= tests
/lib
/uuid-test.c
130 uuid-test-srcs
+= src
/lib
/hexstrtobin.c
131 uuid-test-srcs
+= src
/lib
/uuid.c
133 bootmem-test-srcs
+= tests
/lib
/bootmem-test.c
134 bootmem-test-srcs
+= tests
/stubs
/console.c
135 bootmem-test-srcs
+= src
/device
/device_util.c
136 bootmem-test-srcs
+= src
/lib
/bootmem.c
137 bootmem-test-srcs
+= src
/lib
/memrange.c
139 dimm_info_util-test-srcs
+= tests
/lib
/dimm_info_util-test.c
140 dimm_info_util-test-srcs
+= src
/device
/dram
/spd.c
141 dimm_info_util-test-srcs
+= src
/lib
/dimm_info_util.c
142 dimm_info_util-test-srcs
+= tests
/stubs
/console.c
144 coreboot_table-test-srcs
+= tests
/lib
/coreboot_table-test.c
145 coreboot_table-test-srcs
+= tests
/stubs
/console.c
146 coreboot_table-test-srcs
+= src
/commonlib
/bsd
/ipchksum.c
147 coreboot_table-test-srcs
+= src
/lib
/coreboot_table.c
148 coreboot_table-test-srcs
+= src
/lib
/imd_cbmem.c
149 coreboot_table-test-srcs
+= src
/lib
/imd.c
150 coreboot_table-test-cflags
+= -I tests
/include/tests
/lib
/fmap
151 coreboot_table-test-mocks
+= cbmem_top_chipset
153 rtc-test-srcs
+= tests
/lib
/rtc-test.c
154 rtc-test-srcs
+= src
/lib
/rtc.c
156 spd_cache-ddr3-test-srcs
+= tests
/lib
/spd_cache-test.c
157 spd_cache-ddr3-test-srcs
+= tests
/stubs
/console.c
158 spd_cache-ddr3-test-srcs
+= src
/lib
/spd_cache.c
159 spd_cache-ddr3-test-srcs
+= src
/lib
/crc_byte.c
160 spd_cache-ddr3-test-srcs
+= src
/commonlib
/region.c
161 spd_cache-ddr3-test-mocks
+= fmap_locate_area_as_rdev
162 spd_cache-ddr3-test-config
+= CONFIG_SPD_CACHE_FMAP_NAME
=\"RW_SPD_CACHE
\" \
163 CONFIG_DIMM_MAX
=4 CONFIG_DIMM_SPD_SIZE
=256 \
164 CONFIG_BOOT_DEVICE_MEMORY_MAPPED
=1
165 spd_cache-ddr3-test-cflags
+= -D__TEST_SPD_CACHE_DDR
=3
167 spd_cache-ddr4-test-srcs
+= tests
/lib
/spd_cache-test.c
168 spd_cache-ddr4-test-srcs
+= tests
/stubs
/console.c
169 spd_cache-ddr4-test-srcs
+= src
/lib
/spd_cache.c
170 spd_cache-ddr4-test-srcs
+= src
/lib
/crc_byte.c
171 spd_cache-ddr4-test-srcs
+= src
/commonlib
/region.c
172 spd_cache-ddr4-test-mocks
+= fmap_locate_area_as_rdev
173 spd_cache-ddr4-test-config
+= CONFIG_SPD_CACHE_FMAP_NAME
=\"RW_SPD_CACHE
\" \
174 CONFIG_DIMM_MAX
=4 CONFIG_DIMM_SPD_SIZE
=512 \
175 CONFIG_BOOT_DEVICE_MEMORY_MAPPED
=1
176 spd_cache-ddr4-test-cflags
+= -D__TEST_SPD_CACHE_DDR
=4
178 cbmem_stage_cache-test-srcs
+= tests
/lib
/cbmem_stage_cache-test.c
179 cbmem_stage_cache-test-srcs
+= tests
/stubs
/console.c
180 cbmem_stage_cache-test-srcs
+= src
/lib
/cbmem_stage_cache.c
181 cbmem_stage_cache-test-srcs
+= src
/lib
/imd_cbmem.c
182 cbmem_stage_cache-test-srcs
+= src
/lib
/imd.c
183 cbmem_stage_cache-test-config
+= CONFIG_CBMEM_STAGE_CACHE
=1
185 libgcc-test-srcs
+= tests
/lib
/libgcc-test.c
187 # CBFS varification tests are compiled with CONFIG_CBFS_VERIFICATION
188 # and VB2_SUPPORT_SHA512 set and unset. Code should work with and without
189 # verification and with hash structure of different sizes.
190 cbfs-verification-no-sha512-test-stage
:= bootblock
191 cbfs-verification-no-sha512-test-srcs
:= tests
/lib
/cbfs-verification-test.c \
192 tests
/stubs
/console.c \
194 tests
/mock
/cbfs_file_mock.c \
196 src
/commonlib
/bsd
/cbfs_private.c \
197 src
/commonlib
/mem_pool.c \
198 src
/commonlib
/region.c
199 cbfs-verification-no-sha512-test-mocks
+= cbfs_get_boot_device cbfs_lookup
200 cbfs-verification-no-sha512-test-config
+= CONFIG_COLLECT_TIMESTAMPS
=0 \
201 CONFIG_CBFS_VERIFICATION
=1 \
202 CONFIG_NO_CBFS_MCACHE
=1 \
205 $(call copy-test
,cbfs-verification-no-sha512-test
,cbfs-verification-has-sha512-test
)
206 cbfs-verification-has-sha512-test-config
+= VB2_SUPPORT_SHA512
=1
208 $(call copy-test
,cbfs-verification-no-sha512-test
,cbfs-no-verification-no-sha512-test
)
209 cbfs-no-verification-no-sha512-test-config
+= CONFIG_CBFS_VERIFICATION
=0
211 $(call copy-test
,cbfs-verification-no-sha512-test
,cbfs-no-verification-has-sha512-test
)
212 cbfs-no-verification-has-sha512-test-config
+= CONFIG_CBFS_VERIFICATION
=0 \
215 cbfs-lookup-no-mcache-test-srcs
= tests
/lib
/cbfs-lookup-test.c \
216 tests
/stubs
/console.c \
218 tests
/mock
/cbfs_file_mock.c \
220 src
/commonlib
/bsd
/cbfs_private.c \
221 src
/commonlib
/bsd
/cbfs_mcache.c \
222 src
/commonlib
/mem_pool.c \
223 src
/commonlib
/region.c
224 cbfs-lookup-no-mcache-test-mocks
+= cbfs_get_boot_device \
229 cbfs-lookup-no-mcache-test-config
+= CONFIG_ARCH_X86
=0 \
230 CONFIG_COLLECT_TIMESTAMPS
=0 \
231 CONFIG_NO_CBFS_MCACHE
=1
233 $(call copy-test
,cbfs-lookup-no-mcache-test
,cbfs-lookup-has-mcache-test
)
234 cbfs-lookup-has-mcache-test-config
+= CONFIG_NO_CBFS_MCACHE
=0
236 lzma-test-srcs
+= tests
/lib
/lzma-test.c
237 lzma-test-srcs
+= tests
/stubs
/console.c
238 lzma-test-srcs
+= src
/lib
/lzma.c
239 lzma-test-srcs
+= src
/lib
/lzmadecode.c
240 lzma-test-syssrcs
+= tests
/helpers
/file.c
242 ux_locales-test-srcs
+= tests
/lib
/ux_locales-test.c
243 ux_locales-test-srcs
+= tests
/stubs
/console.c
244 ux_locales-test-srcs
+= src
/lib
/ux_locales.c
245 ux_locales-test-mocks
+= _cbfs_alloc \
247 vb2api_get_locale_id \
249 ux_locales-test-config
+= CONFIG_VBOOT
=1