mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-28 15:33:42 +02:00

BUG=b:157280555 BRANCH=none TEST=builds Change-Id: If4a1fe7c499f51bb9d7cd48ef26caf9dfae3c1fa Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/41655 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
33 lines
683 B
Meson
33 lines
683 B
Meson
root_includes = include_directories('../subprojects')
|
|
|
|
srcs = [
|
|
'tests.c',
|
|
'helpers.c',
|
|
'flashrom.c',
|
|
'spi25.c',
|
|
]
|
|
|
|
mocks = [
|
|
'-Wl,--wrap=physunmap',
|
|
'-Wl,--wrap=physmap',
|
|
'-Wl,--wrap=spi_send_command',
|
|
'-Wl,--gc-sections',
|
|
]
|
|
|
|
flashrom_tests = executable('flashrom_unit_tests',
|
|
srcs,
|
|
include_directories : root_includes,
|
|
c_args : [
|
|
cargs,
|
|
'-ffunction-sections',
|
|
'-fdata-sections',
|
|
# '-DSTANDALONE',
|
|
'-DCONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_DUMMY',
|
|
'-DCONFIG_DEFAULT_PROGRAMMER_ARGS=""',
|
|
],
|
|
export_dynamic : true,
|
|
link_args : mocks,
|
|
dependencies : [cmocka_dep, flashrom_test_dep],
|
|
)
|
|
test('cmocka test flashrom', flashrom_tests)
|