Jan Dabros | b0800d3 | 2020-05-06 16:01:27 +0200 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
Jan Dabros | 2d0ee36 | 2020-04-20 15:19:45 +0200 | [diff] [blame] | 2 | |
Jan Dabros | 2d0ee36 | 2020-04-20 15:19:45 +0200 | [diff] [blame] | 3 | tests-y += string-test |
Anna Karas | 072a9b9 | 2020-06-08 15:16:19 +0200 | [diff] [blame] | 4 | tests-y += b64_decode-test |
Anna Karas | 5664bc8 | 2020-07-02 10:09:47 +0200 | [diff] [blame] | 5 | tests-y += hexstrtobin-test |
Jakub Czapiga | 466a378 | 2020-10-05 10:44:46 +0200 | [diff] [blame] | 6 | tests-y += imd-test |
Jakub Czapiga | e0c60f3 | 2020-10-09 10:07:47 +0200 | [diff] [blame] | 7 | tests-y += timestamp-test |
Jakub Czapiga | e0af9fc | 2020-10-09 16:02:46 +0200 | [diff] [blame] | 8 | tests-y += edid-test |
Jakub Czapiga | f9961ff | 2020-11-16 15:25:34 +0100 | [diff] [blame] | 9 | tests-y += cbmem_console-romstage-test |
| 10 | tests-y += cbmem_console-ramstage-test |
Jakub Czapiga | ea378cc | 2020-11-12 12:10:51 +0100 | [diff] [blame] | 11 | tests-y += list-test |
Jakub Czapiga | dd85c82 | 2020-12-10 11:16:47 +0100 | [diff] [blame] | 12 | tests-y += fmap-test |
Jakub Czapiga | a2b21c2 | 2020-10-08 12:37:40 +0200 | [diff] [blame] | 13 | tests-y += imd_cbmem-romstage-test |
| 14 | tests-y += imd_cbmem-ramstage-test |
Jakub Czapiga | eb6f80d | 2021-01-07 09:24:33 +0100 | [diff] [blame] | 15 | tests-y += region_file-test |
Jakub Czapiga | b3a7c84 | 2021-02-05 15:10:25 +0100 | [diff] [blame] | 16 | tests-y += stack-test |
Jakub Czapiga | 7a940df | 2021-02-15 12:07:10 +0100 | [diff] [blame] | 17 | tests-y += memset-test |
Jakub Czapiga | c4ca8c3 | 2021-02-16 11:13:32 +0100 | [diff] [blame] | 18 | tests-y += memcmp-test |
Jakub Czapiga | cc7acb8 | 2021-02-15 14:21:20 +0100 | [diff] [blame] | 19 | tests-y += memchr-test |
Jakub Czapiga | eb4bb6f | 2021-02-16 13:27:17 +0100 | [diff] [blame] | 20 | tests-y += memcpy-test |
Jakub Czapiga | 7a18721 | 2021-02-15 09:54:03 +0100 | [diff] [blame] | 21 | tests-y += malloc-test |
Jakub Czapiga | f5e636c | 2021-02-19 10:09:42 +0100 | [diff] [blame] | 22 | tests-y += memmove-test |
Jakub Czapiga | 0b6b968 | 2021-02-24 16:33:21 +0100 | [diff] [blame] | 23 | tests-y += crc_byte-test |
Jakub Czapiga | 9f13cb7 | 2021-02-25 13:13:20 +0100 | [diff] [blame] | 24 | tests-y += compute_ip_checksum-test |
Jan Dabros | 9e16ca9 | 2020-07-08 22:33:52 +0200 | [diff] [blame] | 25 | tests-y += memrange-test |
Jakub Czapiga | f5c0021 | 2021-03-31 12:41:29 +0200 | [diff] [blame] | 26 | tests-y += uuid-test |
Jan Dabros | 9357693 | 2020-07-16 12:05:47 +0200 | [diff] [blame] | 27 | tests-y += bootmem-test |
Jakub Czapiga | dadcae6 | 2021-04-08 16:29:03 +0200 | [diff] [blame] | 28 | tests-y += dimm_info_util-test |
Jakub Czapiga | 5d88483 | 2021-04-06 09:42:02 +0200 | [diff] [blame] | 29 | tests-y += coreboot_table-test |
Jakub Czapiga | a37c802 | 2021-04-15 11:39:13 +0200 | [diff] [blame] | 30 | tests-y += rtc-test |
Jakub Czapiga | 2b8d721 | 2021-04-22 20:14:02 +0200 | [diff] [blame] | 31 | tests-y += spd_cache-ddr3-test |
| 32 | tests-y += spd_cache-ddr4-test |
Jakub Czapiga | db4b21a | 2021-05-25 15:46:37 +0200 | [diff] [blame] | 33 | tests-y += cbmem_stage_cache-test |
Jakub Czapiga | ca3aa52 | 2021-07-13 15:03:10 +0200 | [diff] [blame] | 34 | tests-y += libgcc-test |
Jakub Czapiga | 6f3fd63 | 2021-07-22 08:52:46 +0200 | [diff] [blame] | 35 | tests-y += cbfs-verification-no-sha512-test |
| 36 | tests-y += cbfs-verification-has-sha512-test |
| 37 | tests-y += cbfs-no-verification-no-sha512-test |
| 38 | tests-y += cbfs-no-verification-has-sha512-test |
Jakub Czapiga | b20aa09 | 2021-07-27 17:04:11 +0200 | [diff] [blame] | 39 | tests-y += cbfs-lookup-no-mcache-test |
| 40 | tests-y += cbfs-lookup-has-mcache-test |
Jakub Czapiga | c1e4c5a | 2021-07-23 13:35:14 +0200 | [diff] [blame^] | 41 | tests-y += lzma-test |
Jan Dabros | 2d0ee36 | 2020-04-20 15:19:45 +0200 | [diff] [blame] | 42 | |
| 43 | string-test-srcs += tests/lib/string-test.c |
| 44 | string-test-srcs += src/lib/string.c |
Anna Karas | 072a9b9 | 2020-06-08 15:16:19 +0200 | [diff] [blame] | 45 | |
| 46 | b64_decode-test-srcs += tests/lib/b64_decode-test.c |
Anna Karas | f7cd0d5 | 2020-07-07 16:38:27 +0200 | [diff] [blame] | 47 | b64_decode-test-srcs += tests/stubs/console.c |
Anna Karas | 072a9b9 | 2020-06-08 15:16:19 +0200 | [diff] [blame] | 48 | b64_decode-test-srcs += src/lib/b64_decode.c |
Anna Karas | 5664bc8 | 2020-07-02 10:09:47 +0200 | [diff] [blame] | 49 | |
| 50 | hexstrtobin-test-srcs += tests/lib/hexstrtobin-test.c |
| 51 | hexstrtobin-test-srcs += src/lib/hexstrtobin.c |
Jakub Czapiga | 466a378 | 2020-10-05 10:44:46 +0200 | [diff] [blame] | 52 | |
| 53 | imd-test-srcs += tests/lib/imd-test.c |
| 54 | imd-test-srcs += tests/stubs/console.c |
Jakub Czapiga | e0c60f3 | 2020-10-09 10:07:47 +0200 | [diff] [blame] | 55 | imd-test-srcs += src/lib/imd.c |
| 56 | |
| 57 | timestamp-test-srcs += tests/lib/timestamp-test.c |
| 58 | timestamp-test-srcs += tests/stubs/timestamp.c |
| 59 | timestamp-test-srcs += tests/stubs/console.c |
| 60 | timestamp-test-stage := romstage |
Jakub Czapiga | e0af9fc | 2020-10-09 16:02:46 +0200 | [diff] [blame] | 61 | |
| 62 | edid-test-srcs += tests/lib/edid-test.c |
| 63 | edid-test-srcs += src/lib/edid.c |
| 64 | edid-test-srcs += tests/stubs/console.c |
| 65 | |
Jakub Czapiga | f9961ff | 2020-11-16 15:25:34 +0100 | [diff] [blame] | 66 | cbmem_console-romstage-test-stage := romstage |
| 67 | cbmem_console-romstage-test-srcs += tests/lib/cbmem_console-test.c |
| 68 | cbmem_console-romstage-test-srcs += tests/stubs/console.c |
| 69 | |
| 70 | cbmem_console-ramstage-test-stage := ramstage |
| 71 | cbmem_console-ramstage-test-srcs += tests/lib/cbmem_console-test.c |
Jakub Czapiga | ea378cc | 2020-11-12 12:10:51 +0100 | [diff] [blame] | 72 | cbmem_console-ramstage-test-srcs += tests/stubs/console.c |
| 73 | |
| 74 | list-test-srcs += tests/lib/list-test.c |
| 75 | list-test-srcs += src/lib/list.c |
| 76 | |
Jakub Czapiga | dd85c82 | 2020-12-10 11:16:47 +0100 | [diff] [blame] | 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 |
Jakub Czapiga | a2b21c2 | 2020-10-08 12:37:40 +0200 | [diff] [blame] | 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 | |
| 90 | imd_cbmem-romstage-test-stage := romstage |
| 91 | imd_cbmem-romstage-test-srcs += tests/lib/imd_cbmem-test.c |
| 92 | imd_cbmem-romstage-test-srcs += tests/stubs/console.c |
| 93 | imd_cbmem-romstage-test-srcs += src/lib/imd.c |
| 94 | imd_cbmem-romstage-test-mocks += cbmem_top_chipset |
| 95 | |
Jakub Czapiga | eb6f80d | 2021-01-07 09:24:33 +0100 | [diff] [blame] | 96 | region_file-test-srcs += tests/lib/region_file-test.c |
| 97 | region_file-test-srcs += src/commonlib/region.c |
| 98 | region_file-test-srcs += tests/stubs/console.c |
Jakub Czapiga | b3a7c84 | 2021-02-05 15:10:25 +0100 | [diff] [blame] | 99 | |
| 100 | stack-test-srcs += tests/lib/stack-test.c |
| 101 | stack-test-srcs += src/lib/stack.c |
| 102 | stack-test-srcs += tests/stubs/console.c |
Jakub Czapiga | 7a940df | 2021-02-15 12:07:10 +0100 | [diff] [blame] | 103 | |
| 104 | memset-test-srcs += tests/lib/memset-test.c |
| 105 | memset-test-srcs += src/lib/memset.c |
Jakub Czapiga | c4ca8c3 | 2021-02-16 11:13:32 +0100 | [diff] [blame] | 106 | |
| 107 | memcmp-test-srcs += tests/lib/memcmp-test.c |
| 108 | |
Jakub Czapiga | cc7acb8 | 2021-02-15 14:21:20 +0100 | [diff] [blame] | 109 | memchr-test-srcs += tests/lib/memchr-test.c |
| 110 | memchr-test-srcs += src/lib/memchr.c |
| 111 | |
Jakub Czapiga | eb4bb6f | 2021-02-16 13:27:17 +0100 | [diff] [blame] | 112 | memcpy-test-srcs += tests/lib/memcpy-test.c |
| 113 | |
Jakub Czapiga | 7a18721 | 2021-02-15 09:54:03 +0100 | [diff] [blame] | 114 | malloc-test-srcs += tests/lib/malloc-test.c |
| 115 | malloc-test-srcs += tests/stubs/console.c |
| 116 | |
Jakub Czapiga | f5e636c | 2021-02-19 10:09:42 +0100 | [diff] [blame] | 117 | memmove-test-srcs += tests/lib/memmove-test.c |
| 118 | |
Jakub Czapiga | 0b6b968 | 2021-02-24 16:33:21 +0100 | [diff] [blame] | 119 | crc_byte-test-srcs += tests/lib/crc_byte-test.c |
| 120 | crc_byte-test-srcs += src/lib/crc_byte.c |
| 121 | |
Jakub Czapiga | 9f13cb7 | 2021-02-25 13:13:20 +0100 | [diff] [blame] | 122 | compute_ip_checksum-test-srcs += tests/lib/compute_ip_checksum-test.c |
| 123 | compute_ip_checksum-test-srcs += src/lib/compute_ip_checksum.c |
| 124 | |
Jan Dabros | 9e16ca9 | 2020-07-08 22:33:52 +0200 | [diff] [blame] | 125 | memrange-test-srcs += tests/lib/memrange-test.c |
| 126 | memrange-test-srcs += src/lib/memrange.c |
| 127 | memrange-test-srcs += tests/stubs/console.c |
| 128 | memrange-test-srcs += src/device/device_util.c |
| 129 | |
Jakub Czapiga | f5c0021 | 2021-03-31 12:41:29 +0200 | [diff] [blame] | 130 | uuid-test-srcs += tests/lib/uuid-test.c |
| 131 | uuid-test-srcs += src/lib/hexstrtobin.c |
| 132 | uuid-test-srcs += src/lib/uuid.c |
Jan Dabros | 9357693 | 2020-07-16 12:05:47 +0200 | [diff] [blame] | 133 | |
| 134 | bootmem-test-srcs += tests/lib/bootmem-test.c |
| 135 | bootmem-test-srcs += tests/stubs/console.c |
| 136 | bootmem-test-srcs += src/device/device_util.c |
| 137 | bootmem-test-srcs += src/lib/bootmem.c |
| 138 | bootmem-test-srcs += src/lib/memrange.c |
| 139 | |
Jakub Czapiga | dadcae6 | 2021-04-08 16:29:03 +0200 | [diff] [blame] | 140 | dimm_info_util-test-srcs += tests/lib/dimm_info_util-test.c |
| 141 | dimm_info_util-test-srcs += src/lib/dimm_info_util.c |
| 142 | dimm_info_util-test-srcs += tests/stubs/console.c |
| 143 | |
Jakub Czapiga | 5d88483 | 2021-04-06 09:42:02 +0200 | [diff] [blame] | 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/lib/compute_ip_checksum.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 |
Jakub Czapiga | 5d88483 | 2021-04-06 09:42:02 +0200 | [diff] [blame] | 150 | coreboot_table-test-cflags += -I tests/include/tests/lib/fmap |
| 151 | coreboot_table-test-mocks += cbmem_top_chipset |
Jakub Czapiga | a37c802 | 2021-04-15 11:39:13 +0200 | [diff] [blame] | 152 | |
| 153 | rtc-test-srcs += tests/lib/rtc-test.c |
| 154 | rtc-test-srcs += src/lib/rtc.c |
| 155 | |
Jakub Czapiga | 2b8d721 | 2021-04-22 20:14:02 +0200 | [diff] [blame] | 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 | |
| 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 |
Jakub Czapiga | db4b21a | 2021-05-25 15:46:37 +0200 | [diff] [blame] | 177 | |
| 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 |
Jakub Czapiga | db4b21a | 2021-05-25 15:46:37 +0200 | [diff] [blame] | 183 | cbmem_stage_cache-test-config += CONFIG_CBMEM_STAGE_CACHE=1 |
Jakub Czapiga | ca3aa52 | 2021-07-13 15:03:10 +0200 | [diff] [blame] | 184 | |
| 185 | libgcc-test-srcs += tests/lib/libgcc-test.c |
Jakub Czapiga | 6f3fd63 | 2021-07-22 08:52:46 +0200 | [diff] [blame] | 186 | |
| 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 \ |
| 193 | tests/stubs/die.c \ |
| 194 | tests/mock/cbfs_file_mock.c \ |
| 195 | src/lib/cbfs.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 \ |
| 203 | VB2_SUPPORT_SHA512=0 |
| 204 | |
| 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 |
| 207 | |
| 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 |
| 210 | |
| 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 \ |
| 213 | VB2_SUPPORT_SHA512=1 |
Jakub Czapiga | b20aa09 | 2021-07-27 17:04:11 +0200 | [diff] [blame] | 214 | |
| 215 | cbfs-lookup-no-mcache-test-srcs = tests/lib/cbfs-lookup-test.c \ |
| 216 | tests/stubs/console.c \ |
| 217 | tests/stubs/die.c \ |
| 218 | tests/mock/cbfs_file_mock.c \ |
| 219 | src/lib/cbfs.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 \ |
| 225 | cbfs_lookup \ |
| 226 | cbfs_mcache_lookup \ |
| 227 | mem_pool_alloc \ |
| 228 | mem_pool_free |
| 229 | cbfs-lookup-no-mcache-test-config += CONFIG_ARCH_X86=0 \ |
| 230 | CONFIG_COLLECT_TIMESTAMPS=0 \ |
| 231 | CONFIG_NO_CBFS_MCACHE=1 |
| 232 | |
| 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 |
Jakub Czapiga | c1e4c5a | 2021-07-23 13:35:14 +0200 | [diff] [blame^] | 235 | |
| 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 |