Attention is currently required from: Nico Huber, Thomas Heijligen, Edward O'Callaghan, Angel Pons. Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55295 )
Change subject: tests: Do not run a test if its driver is not built ......................................................................
Patch Set 5:
(2 comments)
Patchset:
PS4:
cmocka offers a function TO skip a test. this would make clear, that nothing was executed. […]
This is a great idea, thank you so much! I decided to use this idea straight away. This is indeed more correct to skip the test vs running empty.
Also I now realised that thanks to your work on programmer enum, log message is saying "Testing programmer_init for programmer=linux_spi ..." instead of "Testing programmer_init for programmer=24 ...", so nice :)
File tests/init_shutdown.c:
https://review.coreboot.org/c/flashrom/+/55295/comment/9a900ef5_ca62173a PS1, Line 35: #if CONFIG_DUMMY == 1 : void dummy_init_and_shutdown_test_success(void **state) : { : run_lifecycle(state, PROGRAMMER_DUMMY, "bus=parallel+lpc+fwh+spi"); : } : #endif /* CONFIG_DUMMY */
"yes"/"no" is only used on the user end. Both Meson and the Makefile always use […]
This is a work of art! I evaluated it step by step on a piece of paper, but wow to someone who wrote this :)
Generally, yes, that's very cool! But for tests, I recently realised that for some tests more guards are needed, not just checking CONFIG_xxx. For example ene_lpc the whole file is guarded by `#if defined(__i386__) || defined(__x86_64__)` and my understanding test should copy the same.