tests: Support linking with system libc

This patch allows for linking selected files with system libc. This
allows for creating libraries interacting with filesystem, standard I/O
and other parts of system. Until now it was only possible using CMocka
proxy functions or functions not masked by code under test.

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I652362ba61a25e974d706357fc36479ccee763e4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70108
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jan Dabros <jsd@semihalf.com>
This commit is contained in:
Jakub Czapiga
2022-11-14 11:22:59 +01:00
committed by Martin L Roth
parent 69a6dd6aae
commit e744ba643d
2 changed files with 21 additions and 9 deletions

View File

@@ -51,6 +51,8 @@ $(call evaluate_subdirs)
$(foreach test, $(alltests), \
$(eval $(test)-srcobjs := $(addprefix $(testobj)/$(test)/, \
$(patsubst %.c,%.o,$(filter src/%,$($(test)-srcs))))) \
$(eval $(test)-sysobjs := $(addprefix $(testobj)/$(test)/, \
$(patsubst %.c,%.o,$($(test)-syssrcs)))) \
$(eval $(test)-objs := $(addprefix $(testobj)/$(test)/, \
$(patsubst %.c,%.o,$($(test)-srcs)))))
$(foreach test, $(alltests), \