2020-05-06 16:01:27 +02:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2020-04-20 15:19:45 +02:00
|
|
|
|
2021-12-02 03:54:32 +01:00
|
|
|
tests-y += lib-test
|
2020-04-20 15:19:45 +02:00
|
|
|
tests-y += string-test
|
2020-06-08 15:16:19 +02:00
|
|
|
tests-y += b64_decode-test
|
2020-07-02 10:09:47 +02:00
|
|
|
tests-y += hexstrtobin-test
|
2020-10-05 10:44:46 +02:00
|
|
|
tests-y += imd-test
|
2020-10-09 10:07:47 +02:00
|
|
|
tests-y += timestamp-test
|
2020-10-09 16:02:46 +02:00
|
|
|
tests-y += edid-test
|
2020-11-16 15:25:34 +01:00
|
|
|
tests-y += cbmem_console-romstage-test
|
|
|
|
tests-y += cbmem_console-ramstage-test
|
2020-11-12 12:10:51 +01:00
|
|
|
tests-y += list-test
|
2020-12-10 11:16:47 +01:00
|
|
|
tests-y += fmap-test
|
2020-10-08 12:37:40 +02:00
|
|
|
tests-y += imd_cbmem-romstage-test
|
|
|
|
tests-y += imd_cbmem-ramstage-test
|
2021-01-07 09:24:33 +01:00
|
|
|
tests-y += region_file-test
|
2021-02-05 15:10:25 +01:00
|
|
|
tests-y += stack-test
|
2021-02-15 12:07:10 +01:00
|
|
|
tests-y += memset-test
|
2021-02-16 11:13:32 +01:00
|
|
|
tests-y += memcmp-test
|
2021-02-15 14:21:20 +01:00
|
|
|
tests-y += memchr-test
|
2021-02-16 13:27:17 +01:00
|
|
|
tests-y += memcpy-test
|
2021-02-15 09:54:03 +01:00
|
|
|
tests-y += malloc-test
|
2021-02-19 10:09:42 +01:00
|
|
|
tests-y += memmove-test
|
2021-02-24 16:33:21 +01:00
|
|
|
tests-y += crc_byte-test
|
2021-02-25 13:13:20 +01:00
|
|
|
tests-y += compute_ip_checksum-test
|
2020-07-08 22:33:52 +02:00
|
|
|
tests-y += memrange-test
|
2021-03-31 12:41:29 +02:00
|
|
|
tests-y += uuid-test
|
2020-07-16 12:05:47 +02:00
|
|
|
tests-y += bootmem-test
|
2021-04-08 16:29:03 +02:00
|
|
|
tests-y += dimm_info_util-test
|
2021-04-06 09:42:02 +02:00
|
|
|
tests-y += coreboot_table-test
|
2021-04-15 11:39:13 +02:00
|
|
|
tests-y += rtc-test
|
2021-04-22 20:14:02 +02:00
|
|
|
tests-y += spd_cache-ddr3-test
|
|
|
|
tests-y += spd_cache-ddr4-test
|
2021-05-25 15:46:37 +02:00
|
|
|
tests-y += cbmem_stage_cache-test
|
2021-07-13 15:03:10 +02:00
|
|
|
tests-y += libgcc-test
|
2021-07-22 08:52:46 +02:00
|
|
|
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
|
2021-07-27 17:04:11 +02:00
|
|
|
tests-y += cbfs-lookup-no-mcache-test
|
|
|
|
tests-y += cbfs-lookup-has-mcache-test
|
2021-07-23 13:35:14 +02:00
|
|
|
tests-y += lzma-test
|
2020-04-20 15:19:45 +02:00
|
|
|
|
2021-12-02 03:54:32 +01:00
|
|
|
lib-test-srcs += tests/lib/lib-test.c
|
|
|
|
|
2020-04-20 15:19:45 +02:00
|
|
|
string-test-srcs += tests/lib/string-test.c
|
|
|
|
string-test-srcs += src/lib/string.c
|
2020-06-08 15:16:19 +02:00
|
|
|
|
|
|
|
b64_decode-test-srcs += tests/lib/b64_decode-test.c
|
2020-07-07 16:38:27 +02:00
|
|
|
b64_decode-test-srcs += tests/stubs/console.c
|
2020-06-08 15:16:19 +02:00
|
|
|
b64_decode-test-srcs += src/lib/b64_decode.c
|
2020-07-02 10:09:47 +02:00
|
|
|
|
|
|
|
hexstrtobin-test-srcs += tests/lib/hexstrtobin-test.c
|
|
|
|
hexstrtobin-test-srcs += src/lib/hexstrtobin.c
|
2020-10-05 10:44:46 +02:00
|
|
|
|
|
|
|
imd-test-srcs += tests/lib/imd-test.c
|
|
|
|
imd-test-srcs += tests/stubs/console.c
|
2020-10-09 10:07:47 +02:00
|
|
|
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
|
2020-10-09 16:02:46 +02:00
|
|
|
|
|
|
|
edid-test-srcs += tests/lib/edid-test.c
|
|
|
|
edid-test-srcs += src/lib/edid.c
|
|
|
|
edid-test-srcs += tests/stubs/console.c
|
|
|
|
|
2020-11-16 15:25:34 +01:00
|
|
|
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
|
2020-11-12 12:10:51 +01:00
|
|
|
cbmem_console-ramstage-test-srcs += tests/stubs/console.c
|
|
|
|
|
|
|
|
list-test-srcs += tests/lib/list-test.c
|
|
|
|
list-test-srcs += src/lib/list.c
|
|
|
|
|
2020-12-10 11:16:47 +01:00
|
|
|
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
|
2020-10-08 12:37:40 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2021-01-07 09:24:33 +01:00
|
|
|
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
|
2021-02-05 15:10:25 +01:00
|
|
|
|
|
|
|
stack-test-srcs += tests/lib/stack-test.c
|
|
|
|
stack-test-srcs += src/lib/stack.c
|
|
|
|
stack-test-srcs += tests/stubs/console.c
|
2021-02-15 12:07:10 +01:00
|
|
|
|
|
|
|
memset-test-srcs += tests/lib/memset-test.c
|
|
|
|
memset-test-srcs += src/lib/memset.c
|
2021-02-16 11:13:32 +01:00
|
|
|
|
|
|
|
memcmp-test-srcs += tests/lib/memcmp-test.c
|
|
|
|
|
2021-02-15 14:21:20 +01:00
|
|
|
memchr-test-srcs += tests/lib/memchr-test.c
|
|
|
|
memchr-test-srcs += src/lib/memchr.c
|
|
|
|
|
2021-02-16 13:27:17 +01:00
|
|
|
memcpy-test-srcs += tests/lib/memcpy-test.c
|
|
|
|
|
2021-02-15 09:54:03 +01:00
|
|
|
malloc-test-srcs += tests/lib/malloc-test.c
|
|
|
|
malloc-test-srcs += tests/stubs/console.c
|
|
|
|
|
2021-02-19 10:09:42 +01:00
|
|
|
memmove-test-srcs += tests/lib/memmove-test.c
|
|
|
|
|
2021-02-24 16:33:21 +01:00
|
|
|
crc_byte-test-srcs += tests/lib/crc_byte-test.c
|
|
|
|
crc_byte-test-srcs += src/lib/crc_byte.c
|
|
|
|
|
2021-02-25 13:13:20 +01:00
|
|
|
compute_ip_checksum-test-srcs += tests/lib/compute_ip_checksum-test.c
|
|
|
|
compute_ip_checksum-test-srcs += src/lib/compute_ip_checksum.c
|
|
|
|
|
2020-07-08 22:33:52 +02:00
|
|
|
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
|
|
|
|
|
2021-03-31 12:41:29 +02:00
|
|
|
uuid-test-srcs += tests/lib/uuid-test.c
|
|
|
|
uuid-test-srcs += src/lib/hexstrtobin.c
|
|
|
|
uuid-test-srcs += src/lib/uuid.c
|
2020-07-16 12:05:47 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2021-04-08 16:29:03 +02:00
|
|
|
dimm_info_util-test-srcs += tests/lib/dimm_info_util-test.c
|
2021-10-26 17:16:21 +02:00
|
|
|
dimm_info_util-test-srcs += src/device/dram/spd.c
|
2021-04-08 16:29:03 +02:00
|
|
|
dimm_info_util-test-srcs += src/lib/dimm_info_util.c
|
|
|
|
dimm_info_util-test-srcs += tests/stubs/console.c
|
|
|
|
|
2021-04-06 09:42:02 +02:00
|
|
|
coreboot_table-test-srcs += tests/lib/coreboot_table-test.c
|
|
|
|
coreboot_table-test-srcs += tests/stubs/console.c
|
|
|
|
coreboot_table-test-srcs += src/lib/compute_ip_checksum.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
|
2021-04-15 11:39:13 +02:00
|
|
|
|
|
|
|
rtc-test-srcs += tests/lib/rtc-test.c
|
|
|
|
rtc-test-srcs += src/lib/rtc.c
|
|
|
|
|
2021-04-22 20:14:02 +02:00
|
|
|
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
|
2021-05-25 15:46:37 +02:00
|
|
|
|
|
|
|
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
|
2021-07-13 15:03:10 +02:00
|
|
|
|
|
|
|
libgcc-test-srcs += tests/lib/libgcc-test.c
|
2021-07-22 08:52:46 +02:00
|
|
|
|
|
|
|
# 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
|
2021-07-27 17:04:11 +02:00
|
|
|
|
|
|
|
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
|
2021-07-23 13:35:14 +02:00
|
|
|
|
|
|
|
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
|