| 1 |
|
| 2 |
|
| 3 |
tests-y += lib-test |
| 4 |
tests-y += string-test |
| 5 |
tests-y += b64_decode-test |
| 6 |
tests-y += hexstrtobin-test |
| 7 |
tests-y += imd-test |
| 8 |
tests-y += timestamp-test |
| 9 |
tests-y += edid-test |
| 10 |
tests-y += cbmem_console-romstage-test |
| 11 |
tests-y += cbmem_console-ramstage-test |
| 12 |
tests-y += fmap-test |
| 13 |
tests-y += imd_cbmem-romstage-test |
| 14 |
tests-y += imd_cbmem-ramstage-test |
| 15 |
tests-y += region_file-test |
| 16 |
tests-y += stack-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 |
| 25 |
tests-y += uuid-test |
| 26 |
tests-y += bootmem-test |
| 27 |
tests-y += dimm_info_util-test |
| 28 |
tests-y += coreboot_table-test |
| 29 |
tests-y += rtc-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 |
| 40 |
tests-y += lzma-test |
| 41 |
tests-y += ux_locales-test |
| 42 |
|
| 43 |
lib-test-srcs += tests/lib/lib-test.c |
| 44 |
|
| 45 |
string-test-srcs += tests/lib/string-test.c |
| 46 |
string-test-srcs += src/lib/string.c |
| 47 |
|
| 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 |
| 51 |
|
| 52 |
hexstrtobin-test-srcs += tests/lib/hexstrtobin-test.c |
| 53 |
hexstrtobin-test-srcs += src/lib/hexstrtobin.c |
| 54 |
|
| 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 |
| 59 |
|
| 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 |
| 64 |
|
| 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 |
| 68 |
|
| 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 |
| 72 |
|
| 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 |
| 76 |
|
| 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 |
| 83 |
|
| 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 |
| 90 |
|
| 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 |
| 97 |
|
| 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 |
| 101 |
|
| 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 |
| 105 |
|
| 106 |
memset-test-srcs += tests/lib/memset-test.c |
| 107 |
memset-test-srcs += src/lib/memset.c |
| 108 |
|
| 109 |
memcmp-test-srcs += tests/lib/memcmp-test.c |
| 110 |
|
| 111 |
memchr-test-srcs += tests/lib/memchr-test.c |
| 112 |
memchr-test-srcs += src/lib/memchr.c |
| 113 |
|
| 114 |
memcpy-test-srcs += tests/lib/memcpy-test.c |
| 115 |
|
| 116 |
malloc-test-srcs += tests/lib/malloc-test.c |
| 117 |
malloc-test-srcs += tests/stubs/console.c |
| 118 |
|
| 119 |
memmove-test-srcs += tests/lib/memmove-test.c |
| 120 |
|
| 121 |
crc_byte-test-srcs += tests/lib/crc_byte-test.c |
| 122 |
crc_byte-test-srcs += src/lib/crc_byte.c |
| 123 |
|
| 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 |
| 128 |
|
| 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 |
| 132 |
|
| 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 |
| 138 |
|
| 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 |
| 143 |
|
| 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 |
| 152 |
|
| 153 |
rtc-test-srcs += tests/lib/rtc-test.c |
| 154 |
rtc-test-srcs += src/lib/rtc.c |
| 155 |
|
| 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 |
| 166 |
spd_cache-ddr3-test-cflags += -I tests/include/tests/lib/fmap |
| 167 |
|
| 168 |
spd_cache-ddr4-test-srcs += tests/lib/spd_cache-test.c |
| 169 |
spd_cache-ddr4-test-srcs += tests/stubs/console.c |
| 170 |
spd_cache-ddr4-test-srcs += src/lib/spd_cache.c |
| 171 |
spd_cache-ddr4-test-srcs += src/lib/crc_byte.c |
| 172 |
spd_cache-ddr4-test-srcs += src/commonlib/region.c |
| 173 |
spd_cache-ddr4-test-mocks += fmap_locate_area_as_rdev |
| 174 |
spd_cache-ddr4-test-config += CONFIG_SPD_CACHE_FMAP_NAME=\"RW_SPD_CACHE\" \ |
| 175 |
CONFIG_DIMM_MAX=4 CONFIG_DIMM_SPD_SIZE=512 \ |
| 176 |
CONFIG_BOOT_DEVICE_MEMORY_MAPPED=1 |
| 177 |
spd_cache-ddr4-test-cflags += -D__TEST_SPD_CACHE_DDR=4 |
| 178 |
spd_cache-ddr4-test-cflags += -I tests/include/tests/lib/fmap |
| 179 |
|
| 180 |
cbmem_stage_cache-test-srcs += tests/lib/cbmem_stage_cache-test.c |
| 181 |
cbmem_stage_cache-test-srcs += tests/stubs/console.c |
| 182 |
cbmem_stage_cache-test-srcs += src/lib/cbmem_stage_cache.c |
| 183 |
cbmem_stage_cache-test-srcs += src/lib/imd_cbmem.c |
| 184 |
cbmem_stage_cache-test-srcs += src/lib/imd.c |
| 185 |
cbmem_stage_cache-test-config += CONFIG_CBMEM_STAGE_CACHE=1 |
| 186 |
|
| 187 |
libgcc-test-srcs += tests/lib/libgcc-test.c |
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
cbfs-verification-no-sha512-test-stage := bootblock |
| 193 |
cbfs-verification-no-sha512-test-srcs := tests/lib/cbfs-verification-test.c \ |
| 194 |
tests/stubs/console.c \ |
| 195 |
tests/stubs/die.c \ |
| 196 |
tests/mock/cbfs_file_mock.c \ |
| 197 |
src/lib/cbfs.c \ |
| 198 |
src/commonlib/bsd/cbfs_private.c \ |
| 199 |
src/commonlib/mem_pool.c \ |
| 200 |
src/commonlib/region.c |
| 201 |
cbfs-verification-no-sha512-test-mocks += cbfs_get_boot_device cbfs_lookup |
| 202 |
cbfs-verification-no-sha512-test-config += CONFIG_COLLECT_TIMESTAMPS=0 \ |
| 203 |
CONFIG_CBFS_VERIFICATION=1 \ |
| 204 |
CONFIG_NO_CBFS_MCACHE=1 \ |
| 205 |
VB2_SUPPORT_SHA512=0 |
| 206 |
cbfs-verification-no-sha512-test-cflags += -I tests/include/tests/lib/fmap |
| 207 |
|
| 208 |
$(call copy-test,cbfs-verification-no-sha512-test,cbfs-verification-has-sha512-test) |
| 209 |
cbfs-verification-has-sha512-test-config += VB2_SUPPORT_SHA512=1 |
| 210 |
|
| 211 |
$(call copy-test,cbfs-verification-no-sha512-test,cbfs-no-verification-no-sha512-test) |
| 212 |
cbfs-no-verification-no-sha512-test-config += CONFIG_CBFS_VERIFICATION=0 |
| 213 |
|
| 214 |
$(call copy-test,cbfs-verification-no-sha512-test,cbfs-no-verification-has-sha512-test) |
| 215 |
cbfs-no-verification-has-sha512-test-config += CONFIG_CBFS_VERIFICATION=0 \ |
| 216 |
VB2_SUPPORT_SHA512=1 |
| 217 |
|
| 218 |
cbfs-lookup-no-mcache-test-srcs = tests/lib/cbfs-lookup-test.c \ |
| 219 |
tests/stubs/console.c \ |
| 220 |
tests/stubs/die.c \ |
| 221 |
tests/mock/cbfs_file_mock.c \ |
| 222 |
src/lib/cbfs.c \ |
| 223 |
src/commonlib/bsd/cbfs_private.c \ |
| 224 |
src/commonlib/bsd/cbfs_mcache.c \ |
| 225 |
src/commonlib/mem_pool.c \ |
| 226 |
src/commonlib/region.c |
| 227 |
cbfs-lookup-no-mcache-test-mocks += cbfs_get_boot_device \ |
| 228 |
cbfs_lookup \ |
| 229 |
cbfs_mcache_lookup \ |
| 230 |
mem_pool_alloc \ |
| 231 |
mem_pool_free |
| 232 |
cbfs-lookup-no-mcache-test-config += CONFIG_ARCH_X86=0 \ |
| 233 |
CONFIG_COLLECT_TIMESTAMPS=0 \ |
| 234 |
CONFIG_NO_CBFS_MCACHE=1 |
| 235 |
cbfs-lookup-no-mcache-test-cflags += -I tests/include/tests/lib/fmap |
| 236 |
|
| 237 |
$(call copy-test,cbfs-lookup-no-mcache-test,cbfs-lookup-has-mcache-test) |
| 238 |
cbfs-lookup-has-mcache-test-config += CONFIG_NO_CBFS_MCACHE=0 |
| 239 |
|
| 240 |
lzma-test-srcs += tests/lib/lzma-test.c |
| 241 |
lzma-test-srcs += tests/stubs/console.c |
| 242 |
lzma-test-srcs += src/lib/lzma.c |
| 243 |
lzma-test-srcs += src/lib/lzmadecode.c |
| 244 |
lzma-test-syssrcs += tests/helpers/file.c |
| 245 |
|
| 246 |
ux_locales-test-srcs += tests/lib/ux_locales-test.c |
| 247 |
ux_locales-test-srcs += tests/stubs/console.c |
| 248 |
ux_locales-test-srcs += src/lib/ux_locales.c |
| 249 |
ux_locales-test-mocks += _cbfs_alloc \ |
| 250 |
cbfs_unmap \ |
| 251 |
vb2api_get_locale_id \ |
| 252 |
vboot_get_context |
| 253 |
ux_locales-test-config += CONFIG_VBOOT=1 |