mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
meson: Move programmer test sources into programmer definition
Move the definition of the programmer test source files into the dictionary defining the programmers itself. This way there is a better overview about which of the available programmers have tests and which don't. Also, to keep the tests working, iterate over all programmers and add their test source files to the list of sources that should be built. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: I307faaf8a9f7ae3c54bd96e7d871a3abb8aadea3 Reviewed-on: https://review.coreboot.org/c/flashrom/+/68162 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
3bba710d98
commit
801e7c1674
10
meson.build
10
meson.build
@ -188,6 +188,7 @@ programmer = {
|
||||
'deps' : [ libusb1 ],
|
||||
'groups' : [ group_usb, group_external ],
|
||||
'srcs' : files('dediprog.c', 'usbdev.c'),
|
||||
'test_srcs' : files('tests/dediprog.c'),
|
||||
'flags' : [ '-DCONFIG_DEDIPROG=1' ],
|
||||
},
|
||||
'developerbox_spi' : {
|
||||
@ -217,6 +218,7 @@ programmer = {
|
||||
},
|
||||
'dummy' : {
|
||||
'srcs' : files('dummyflasher.c'),
|
||||
'test_srcs' : files('tests/dummyflasher.c'),
|
||||
'flags' : [ '-DCONFIG_DUMMY=1' ],
|
||||
},
|
||||
'ft2232_spi' : {
|
||||
@ -285,6 +287,7 @@ programmer = {
|
||||
'deps' : [ linux_headers ],
|
||||
'groups' : [ group_internal ],
|
||||
'srcs' : files('linux_mtd.c'),
|
||||
'test_srcs' : files('tests/linux_mtd.c'),
|
||||
'flags' : [ '-DCONFIG_LINUX_MTD=1' ],
|
||||
},
|
||||
'linux_spi' : {
|
||||
@ -292,6 +295,7 @@ programmer = {
|
||||
'deps' : [ linux_headers ],
|
||||
# internal / external?
|
||||
'srcs' : files('linux_spi.c'),
|
||||
'test_srcs' : files('tests/linux_spi.c'),
|
||||
'flags' : [ '-DCONFIG_LINUX_SPI=1' ],
|
||||
},
|
||||
'parade_lspcon' : {
|
||||
@ -299,6 +303,7 @@ programmer = {
|
||||
'deps' : [ linux_headers ],
|
||||
'groups' : [ group_i2c ],
|
||||
'srcs' : files('parade_lspcon.c', 'i2c_helper_linux.c'),
|
||||
'test_srcs' : files('tests/parade_lspcon.c'),
|
||||
'flags' : [ '-DCONFIG_PARADE_LSPCON=1' ],
|
||||
'default' : false
|
||||
},
|
||||
@ -307,6 +312,7 @@ programmer = {
|
||||
'deps' : [ linux_headers ],
|
||||
'groups' : [ group_i2c ],
|
||||
'srcs' : files('mediatek_i2c_spi.c', 'i2c_helper_linux.c'),
|
||||
'test_srcs' : files('tests/mediatek_i2c_spi.c'),
|
||||
'flags' : [ '-DCONFIG_MEDIATEK_I2C_SPI=1' ],
|
||||
'default' : false,
|
||||
},
|
||||
@ -362,6 +368,7 @@ programmer = {
|
||||
'deps' : [ libpci ],
|
||||
'groups' : [ group_pci, group_internal ],
|
||||
'srcs' : files('nicrealtek.c', 'pcidev.c'),
|
||||
'test_srcs' : files('tests/nicrealtek.c'),
|
||||
'flags' : [ '-DCONFIG_NICREALTEK=1' ],
|
||||
},
|
||||
'ogp_spi' : {
|
||||
@ -387,6 +394,7 @@ programmer = {
|
||||
'deps' : [ libusb1 ],
|
||||
'groups' : [ group_usb, group_external ],
|
||||
'srcs' : files('raiden_debug_spi.c', 'usb_device.c'),
|
||||
'test_srcs' : files('tests/raiden_debug_spi.c'),
|
||||
'flags' : [ '-DCONFIG_RAIDEN_DEBUG_SPI=1' ],
|
||||
},
|
||||
'rayer_spi' : {
|
||||
@ -401,6 +409,7 @@ programmer = {
|
||||
'deps' : [ linux_headers ],
|
||||
'groups' : [ group_i2c ],
|
||||
'srcs' : files('realtek_mst_i2c_spi.c', 'i2c_helper_linux.c'),
|
||||
'test_srcs' : files('tests/realtek_mst_i2c_spi.c'),
|
||||
'flags' : [ '-DCONFIG_REALTEK_MST_I2C_SPI=1' ],
|
||||
'default' : false,
|
||||
},
|
||||
@ -447,6 +456,7 @@ foreach p_name, p_data : programmer
|
||||
'deps' : p_data.get('deps', []),
|
||||
'groups' : p_data.get('groups', []),
|
||||
'srcs' : p_data.get('srcs', []),
|
||||
'test_srcs': p_data.get('test_srcs', []),
|
||||
'flags' : p_data.get('flags', []),
|
||||
'default' : p_data.get('default', true),
|
||||
}
|
||||
|
@ -19,15 +19,6 @@ test_srcs = files(
|
||||
'flashrom.c',
|
||||
'spi25.c',
|
||||
'lifecycle.c',
|
||||
'dummyflasher.c',
|
||||
'nicrealtek.c',
|
||||
'raiden_debug_spi.c',
|
||||
'dediprog.c',
|
||||
'linux_mtd.c',
|
||||
'linux_spi.c',
|
||||
'parade_lspcon.c',
|
||||
'mediatek_i2c_spi.c',
|
||||
'realtek_mst_i2c_spi.c',
|
||||
'layout.c',
|
||||
'chip.c',
|
||||
'chip_wp.c',
|
||||
@ -37,6 +28,10 @@ if not programmer.get('dummy').get('active')
|
||||
test_srcs += programmer.get('dummy').get('srcs')
|
||||
endif
|
||||
|
||||
foreach p_name, p_data : programmer
|
||||
test_srcs += p_data.get('test_srcs')
|
||||
endforeach
|
||||
|
||||
mocks = [
|
||||
'-Wl,--wrap=strdup',
|
||||
'-Wl,--wrap=physunmap',
|
||||
|
Loading…
x
Reference in New Issue
Block a user