1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 22:43:17 +02:00

tests: Add run_probe_lifecycle and add dummyflasher probe test

This patch implements run_probe_lifecycle and adds dummyflasher
test to run probing lifecycle.

A lifecycle consists of 3 steps: 1) init programmer 2) do some action
3) shutdown programmer. Step 2 can be "do nothing", and this is
named "basic lifecycle", i.e. the simplest. This patch implements
"probe lifecycle" which probes a chip as Step 2.

Internally there is one run_lifecycle function which performs steps
1, 2, 3. run_lifecycle is operating via libflashrom API. Long term
goal for cli_classic is to operate via libflashrom API, so the test
aligns with this approach.

BUG=b:181803212
TEST=ninja test

Change-Id: I9eb7fe3a436fbba5e70db957139fd26e00efec36
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59741
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
This commit is contained in:
Anastasia Klimchuk
2021-11-29 17:00:27 +11:00
parent 0f51f62c62
commit e539d112cd
3 changed files with 56 additions and 7 deletions

View File

@ -364,6 +364,7 @@ int main(void)
const struct CMUnitTest lifecycle_tests[] = {
cmocka_unit_test(dummy_basic_lifecycle_test_success),
cmocka_unit_test(dummy_probe_lifecycle_test_success),
cmocka_unit_test(nicrealtek_basic_lifecycle_test_success),
cmocka_unit_test(raiden_debug_basic_lifecycle_test_success),
cmocka_unit_test(dediprog_basic_lifecycle_test_success),