aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tests.c
diff options
context:
space:
mode:
authorAnastasia Klimchuk <aklm@chromium.org>2021-11-29 17:00:27 +1100
committerAnastasia Klimchuk <aklm@chromium.org>2022-03-20 22:18:40 +0000
commite539d112cd12ba5d3967b6956af1d91e5bf674a8 (patch)
tree448ac017a43fb45c647f69274b57c8986938a1a1 /tests/tests.c
parent0f51f62c6265af5977fec7425596b65a3926c42b (diff)
downloadflashrom-e539d112cd12ba5d3967b6956af1d91e5bf674a8.tar.gz
flashrom-e539d112cd12ba5d3967b6956af1d91e5bf674a8.tar.bz2
flashrom-e539d112cd12ba5d3967b6956af1d91e5bf674a8.zip
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>
Diffstat (limited to 'tests/tests.c')
-rw-r--r--tests/tests.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/tests.c b/tests/tests.c
index 21cc1ed8..0f160417 100644
--- a/tests/tests.c
+++ b/tests/tests.c
@@ -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),