Attention is currently required from: Angel Pons, Anastasia Klimchuk. Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/51487
to look at the new patch set (#2).
Change subject: Add unit test to run init/shutdown for enabled drivers ......................................................................
Add unit test to run init/shutdown for enabled drivers
I want to do this for all drivers in programmer table, this patch has 3 of them as a proof of concept. There is no hardware in unit test environment, all operations with hardware need to be mocked/redefined.
Calls to __wrap functions are now logged to stdout, makes it easier to understand what’s happening and I find it really helps when writing tests (and can be useful when debugging tests).
Extract from meson-logs/testlog.txt for new test:
[ RUN ] linux_spi_init_and_shutdown_test_success Testing programmer_init for programmer=25 ... __wrap_open64 is called __wrap_ioctl is called __wrap_ioctl is called __wrap_ioctl is called __wrap_fopen64 is called ... programmer_init for programmer=25 successful Testing programmer_shutdown for programmer=25 ... ... programmer_shutdown for programmer=25 successful [ OK ] linux_spi_init_and_shutdown_test_success
BUG=b:181803212 TEST=builds and ninja test
Change-Id: I3af612defe1af3850dfc1626a208d873e3a3eddc Signed-off-by: Anastasia Klimchuk aklm@chromium.org --- M dummyflasher.c M hwaccess.h A hwaccess_io.h A hwaccess_io_unittest.h M meson.build A tests/init_shutdown.c M tests/meson.build M tests/tests.c M tests/tests.h 9 files changed, 374 insertions(+), 138 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/87/51487/2