blob: 7fc547152971a3cd02c53cdadc9b27f19293e014 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
|
# SPDX-License-Identifier: GPL-2.0-only
tests-y += lib-test
tests-y += string-test
tests-y += b64_decode-test
tests-y += hexstrtobin-test
tests-y += imd-test
tests-y += timestamp-test
tests-y += edid-test
tests-y += cbmem_console-romstage-test
tests-y += cbmem_console-ramstage-test
tests-y += fmap-test
tests-y += imd_cbmem-romstage-test
tests-y += imd_cbmem-ramstage-test
tests-y += region_file-test
tests-y += stack-test
tests-y += memset-test
tests-y += memcmp-test
tests-y += memchr-test
tests-y += memcpy-test
tests-y += malloc-test
tests-y += memmove-test
tests-y += crc_byte-test
tests-y += memrange-test
tests-y += uuid-test
tests-y += bootmem-test
tests-y += dimm_info_util-test
tests-y += coreboot_table-test
tests-y += rtc-test
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
tests-y += cbfs-lookup-no-mcache-test
tests-y += cbfs-lookup-has-mcache-test
tests-y += lzma-test
tests-y += ux_locales-test
lib-test-srcs += tests/lib/lib-test.c
string-test-srcs += tests/lib/string-test.c
string-test-srcs += src/lib/string.c
b64_decode-test-srcs += tests/lib/b64_decode-test.c
b64_decode-test-srcs += tests/stubs/console.c
b64_decode-test-srcs += src/lib/b64_decode.c
hexstrtobin-test-srcs += tests/lib/hexstrtobin-test.c
hexstrtobin-test-srcs += src/lib/hexstrtobin.c
imd-test-srcs += tests/lib/imd-test.c
imd-test-srcs += tests/stubs/console.c
imd-test-srcs += src/lib/imd.c
timestamp-test-srcs += tests/lib/timestamp-test.c
timestamp-test-srcs += tests/stubs/timestamp.c
timestamp-test-srcs += tests/stubs/console.c
timestamp-test-stage := romstage
edid-test-srcs += tests/lib/edid-test.c
edid-test-srcs += src/lib/edid.c
edid-test-srcs += tests/stubs/console.c
cbmem_console-romstage-test-stage := romstage
cbmem_console-romstage-test-srcs += tests/lib/cbmem_console-test.c
cbmem_console-romstage-test-srcs += tests/stubs/console.c
cbmem_console-ramstage-test-stage := ramstage
cbmem_console-ramstage-test-srcs += tests/lib/cbmem_console-test.c
cbmem_console-ramstage-test-srcs += tests/stubs/console.c
fmap-test-srcs += tests/lib/fmap-test.c
fmap-test-srcs += src/lib/fmap.c
fmap-test-srcs += tests/stubs/console.c
fmap-test-srcs += src/lib/boot_device.c
fmap-test-srcs += src/commonlib/region.c
fmap-test-cflags += -I tests/include/tests/lib/fmap
imd_cbmem-ramstage-test-stage := ramstage
imd_cbmem-ramstage-test-srcs += tests/lib/imd_cbmem-test.c
imd_cbmem-ramstage-test-srcs += tests/stubs/console.c
imd_cbmem-ramstage-test-srcs += src/lib/imd.c
imd_cbmem-ramstage-test-mocks += cbmem_top_chipset
imd_cbmem-romstage-test-stage := romstage
imd_cbmem-romstage-test-srcs += tests/lib/imd_cbmem-test.c
imd_cbmem-romstage-test-srcs += tests/stubs/console.c
imd_cbmem-romstage-test-srcs += src/lib/imd.c
imd_cbmem-romstage-test-mocks += cbmem_top_chipset
region_file-test-srcs += tests/lib/region_file-test.c
region_file-test-srcs += src/commonlib/region.c
region_file-test-srcs += tests/stubs/console.c
stack-test-srcs += tests/lib/stack-test.c
stack-test-srcs += src/lib/stack.c
stack-test-srcs += tests/stubs/console.c
memset-test-srcs += tests/lib/memset-test.c
memset-test-srcs += src/lib/memset.c
memcmp-test-srcs += tests/lib/memcmp-test.c
memchr-test-srcs += tests/lib/memchr-test.c
memchr-test-srcs += src/lib/memchr.c
memcpy-test-srcs += tests/lib/memcpy-test.c
malloc-test-srcs += tests/lib/malloc-test.c
malloc-test-srcs += tests/stubs/console.c
memmove-test-srcs += tests/lib/memmove-test.c
crc_byte-test-srcs += tests/lib/crc_byte-test.c
crc_byte-test-srcs += src/lib/crc_byte.c
memrange-test-srcs += tests/lib/memrange-test.c
memrange-test-srcs += src/lib/memrange.c
memrange-test-srcs += tests/stubs/console.c
memrange-test-srcs += src/device/device_util.c
uuid-test-srcs += tests/lib/uuid-test.c
uuid-test-srcs += src/lib/hexstrtobin.c
uuid-test-srcs += src/lib/uuid.c
bootmem-test-srcs += tests/lib/bootmem-test.c
bootmem-test-srcs += tests/stubs/console.c
bootmem-test-srcs += src/device/device_util.c
bootmem-test-srcs += src/lib/bootmem.c
bootmem-test-srcs += src/lib/memrange.c
dimm_info_util-test-srcs += tests/lib/dimm_info_util-test.c
dimm_info_util-test-srcs += src/device/dram/spd.c
dimm_info_util-test-srcs += src/lib/dimm_info_util.c
dimm_info_util-test-srcs += tests/stubs/console.c
coreboot_table-test-srcs += tests/lib/coreboot_table-test.c
coreboot_table-test-srcs += tests/stubs/console.c
coreboot_table-test-srcs += src/commonlib/bsd/ipchksum.c
coreboot_table-test-srcs += src/lib/coreboot_table.c
coreboot_table-test-srcs += src/lib/imd_cbmem.c
coreboot_table-test-srcs += src/lib/imd.c
coreboot_table-test-cflags += -I tests/include/tests/lib/fmap
coreboot_table-test-mocks += cbmem_top_chipset
rtc-test-srcs += tests/lib/rtc-test.c
rtc-test-srcs += src/lib/rtc.c
spd_cache-ddr3-test-srcs += tests/lib/spd_cache-test.c
spd_cache-ddr3-test-srcs += tests/stubs/console.c
spd_cache-ddr3-test-srcs += src/lib/spd_cache.c
spd_cache-ddr3-test-srcs += src/lib/crc_byte.c
spd_cache-ddr3-test-srcs += src/commonlib/region.c
spd_cache-ddr3-test-mocks += fmap_locate_area_as_rdev
spd_cache-ddr3-test-config += CONFIG_SPD_CACHE_FMAP_NAME=\"RW_SPD_CACHE\" \
CONFIG_DIMM_MAX=4 CONFIG_DIMM_SPD_SIZE=256 \
CONFIG_BOOT_DEVICE_MEMORY_MAPPED=1
spd_cache-ddr3-test-cflags += -D__TEST_SPD_CACHE_DDR=3
spd_cache-ddr4-test-srcs += tests/lib/spd_cache-test.c
spd_cache-ddr4-test-srcs += tests/stubs/console.c
spd_cache-ddr4-test-srcs += src/lib/spd_cache.c
spd_cache-ddr4-test-srcs += src/lib/crc_byte.c
spd_cache-ddr4-test-srcs += src/commonlib/region.c
spd_cache-ddr4-test-mocks += fmap_locate_area_as_rdev
spd_cache-ddr4-test-config += CONFIG_SPD_CACHE_FMAP_NAME=\"RW_SPD_CACHE\" \
CONFIG_DIMM_MAX=4 CONFIG_DIMM_SPD_SIZE=512 \
CONFIG_BOOT_DEVICE_MEMORY_MAPPED=1
spd_cache-ddr4-test-cflags += -D__TEST_SPD_CACHE_DDR=4
cbmem_stage_cache-test-srcs += tests/lib/cbmem_stage_cache-test.c
cbmem_stage_cache-test-srcs += tests/stubs/console.c
cbmem_stage_cache-test-srcs += src/lib/cbmem_stage_cache.c
cbmem_stage_cache-test-srcs += src/lib/imd_cbmem.c
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
cbfs-lookup-no-mcache-test-srcs = tests/lib/cbfs-lookup-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/bsd/cbfs_mcache.c \
src/commonlib/mem_pool.c \
src/commonlib/region.c
cbfs-lookup-no-mcache-test-mocks += cbfs_get_boot_device \
cbfs_lookup \
cbfs_mcache_lookup \
mem_pool_alloc \
mem_pool_free
cbfs-lookup-no-mcache-test-config += CONFIG_ARCH_X86=0 \
CONFIG_COLLECT_TIMESTAMPS=0 \
CONFIG_NO_CBFS_MCACHE=1
$(call copy-test,cbfs-lookup-no-mcache-test,cbfs-lookup-has-mcache-test)
cbfs-lookup-has-mcache-test-config += CONFIG_NO_CBFS_MCACHE=0
lzma-test-srcs += tests/lib/lzma-test.c
lzma-test-srcs += tests/stubs/console.c
lzma-test-srcs += src/lib/lzma.c
lzma-test-srcs += src/lib/lzmadecode.c
lzma-test-syssrcs += tests/helpers/file.c
ux_locales-test-srcs += tests/lib/ux_locales-test.c
ux_locales-test-srcs += tests/stubs/console.c
ux_locales-test-srcs += src/lib/ux_locales.c
ux_locales-test-mocks += _cbfs_alloc \
cbfs_unmap \
vb2api_get_locale_id \
vboot_get_context
ux_locales-test-config += CONFIG_VBOOT=1
|