From f3d09b5997a80a833b4a44ff922a132e8086556f Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Mon, 9 May 2022 19:37:36 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/flashrom/+/64224 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan Reviewed-by: Anastasia Klimchuk --- tests/tests.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/tests.h') 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); -- cgit v1.2.3