From 62ec7b7156e1b35da66f54f6d493b38a9e78f94c Mon Sep 17 00:00:00 2001 From: Evan Benn Date: Mon, 14 Nov 2022 16:02:47 +1100 Subject: tests: Add selfcheck to unit tests Add unit tests for programmer_table, flashchips, and board_matches structs. The tests are derived from the selfcheck function, checking that the required fields have been filled in. BUG=b:140595239 BRANCH=None TEST=meson test Change-Id: I41cd014d9bf909296b6c28e3e00548e6883ff41a Signed-off-by: Evan Benn Reviewed-on: https://review.coreboot.org/c/flashrom/+/69620 Reviewed-by: Edward O'Callaghan Reviewed-by: Anastasia Klimchuk Tested-by: build bot (Jenkins) --- board_enable.c | 1 + 1 file changed, 1 insertion(+) (limited to 'board_enable.c') diff --git a/board_enable.c b/board_enable.c index 4903c0ff..bf261733 100644 --- a/board_enable.c +++ b/board_enable.c @@ -2524,6 +2524,7 @@ const struct board_match board_matches[] = { #endif { 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, P3, NULL, NULL, 0, NT, NULL}, /* end marker */ }; +const size_t board_matches_size = ARRAY_SIZE(board_matches); int selfcheck_board_enables(void) { -- cgit v1.2.3