1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 06:23:18 +02:00

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>
This commit is contained in:
Thomas Heijligen
2022-05-09 19:37:36 +02:00
committed by Thomas Heijligen
parent 75c048b224
commit f3d09b5997
2 changed files with 42 additions and 34 deletions

View File

@ -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);