aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tests.h
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.com>2022-05-09 19:37:36 +0200
committerThomas Heijligen <src@posteo.de>2022-05-12 08:54:39 +0000
commitf3d09b5997a80a833b4a44ff922a132e8086556f (patch)
tree31ebe905ecab27b56793d868448c083c28b3c5b3 /tests/tests.h
parent75c048b224b05dd76fe617094979c4dae4ad8bb9 (diff)
downloadflashrom-f3d09b5997a80a833b4a44ff922a132e8086556f.tar.gz
flashrom-f3d09b5997a80a833b4a44ff922a132e8086556f.tar.bz2
flashrom-f3d09b5997a80a833b4a44ff922a132e8086556f.zip
tests: Rearange CPP guards
This fixes -Werror=unused-function when not all programmer tests are build. `run_basic_lifecycle` and `run_probe_lifecycle` need to have a prototype to not throw a -Werror=unused-function if no programmer needs them. Change-Id: I02880e73996b30df618738e86b8a52126fbe5b3b Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/64224 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Diffstat (limited to 'tests/tests.h')
-rw-r--r--tests/tests.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/tests.h b/tests/tests.h
index 89e40958..e2b22113 100644
--- a/tests/tests.h
+++ b/tests/tests.h
@@ -41,6 +41,13 @@ void probe_spi_at25f_test_success(void **state);
void probe_spi_st95_test_success(void **state); /* spi95.c */
/* lifecycle.c */
+struct io_mock;
+struct programmer_entry;
+void run_basic_lifecycle(void **state, const struct io_mock *io,
+ const struct programmer_entry *prog, const char *param);
+void run_probe_lifecycle(void **state, const struct io_mock *io,
+ const struct programmer_entry *prog, const char *param, const char *chip_name);
+
void dummy_basic_lifecycle_test_success(void **state);
void dummy_probe_lifecycle_test_success(void **state);
void nicrealtek_basic_lifecycle_test_success(void **state);