coreboot/tests
roccochen@chromium.com f4a123f055 tests: Allow specifying using system Cmocka or building from source
Add a flag "USE_SYSTEM_CMOCKA" in the Makefile of tests. (default 1)

If USE_SYSTEM_CMOCKA=1, we will check if the system has Cmocka module,
and link it directly. If the system doesn't have Cmocka, we will set the
flag to 0 and print a warning message.

If USE_SYSTEM_CMOCKA=0, we will build Cmocka from 3rdparty source code.

BUG=none
TEST=make unit-tests -j
TEST=USE_SYSTEM_CMOCKA=0 make unit-tests -j
BRANCH=none

Signed-off-by: roccochen@chromium.com <roccochen@chromium.org>
Change-Id: I091784ca541e2590e3db0a18ceea83e7895ed0c2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79019
Reviewed-by: Jakub "Kuba" Czapiga <czapiga@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-09-16 15:04:15 +00:00
..
acpi tests: Rename Makefiles from .inc to .mk 2024-01-26 12:43:08 +00:00
commonlib region: Turn region_end() into an inclusive region_last() 2024-08-23 01:08:16 +00:00
console tests: Rename Makefiles from .inc to .mk 2024-01-26 12:43:08 +00:00
data/lib lib/device_tree: Add some FDT helper functions 2024-05-21 13:44:47 +00:00
device tests: Replace 'unsigned long int' by 'unsigned long' 2025-01-12 04:52:30 +00:00
drivers tests/drivers/efivars: Remove duplicated <limits.h> 2024-07-03 20:21:06 +00:00
helpers tests/lib: Factor out file related functions 2024-05-21 13:44:39 +00:00
include include/fmap.h: Require FMAP_SECTION_FLASH_START == 0 2025-04-18 14:56:59 +00:00
lib treewide: Assume FMAP_SECTION_FLASH_START = 0 2025-04-18 14:57:05 +00:00
mock tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
stubs tree: Use <stdio.h> for snprintf 2024-05-29 10:33:54 +00:00
Makefile.common tests: Allow specifying using system Cmocka or building from source 2025-09-16 15:04:15 +00:00
Makefile.mk tests: Allow specifying using system Cmocka or building from source 2025-09-16 15:04:15 +00:00