summaryrefslogtreecommitdiff
path: root/resources/coreboot/default/patches/0011-tests-Enable-config-override-for-tests.patch
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2021-11-21 15:57:40 +0000
committerLeah Rowe <leah@libreboot.org>2021-11-22 10:03:50 +0000
commiteed25bd2209a4c9f7c21a15689b5c90bd3757a6c (patch)
treee0f7711b5a2f6ffb241f408d59f55fca7fc231c1 /resources/coreboot/default/patches/0011-tests-Enable-config-override-for-tests.patch
parentfd586c8f307d56075b6335920a5d3e13a0c6897b (diff)
update coreboot and nuke tianocore20211122
tianocore is a liability for the libreboot project. it's a bloated mess, and unreliable, broken on many boards, and basically impossible to audit. i don't trust tianocore, so i'm removing it.
Diffstat (limited to 'resources/coreboot/default/patches/0011-tests-Enable-config-override-for-tests.patch')
-rw-r--r--resources/coreboot/default/patches/0011-tests-Enable-config-override-for-tests.patch76
1 files changed, 0 insertions, 76 deletions
diff --git a/resources/coreboot/default/patches/0011-tests-Enable-config-override-for-tests.patch b/resources/coreboot/default/patches/0011-tests-Enable-config-override-for-tests.patch
deleted file mode 100644
index 00d74e06..00000000
--- a/resources/coreboot/default/patches/0011-tests-Enable-config-override-for-tests.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From d654c14aa2f150d7b15abc89a3c267b24ca123a1 Mon Sep 17 00:00:00 2001
-From: Jakub Czapiga <jacz@semihalf.com>
-Date: Wed, 28 Apr 2021 16:50:51 +0200
-Subject: [PATCH 11/19] tests: Enable config override for tests
-
-Some tests require to change kconfig symbols values to cover the code.
-This patch enables one to set these vaues using <test-name>-config
-variable.
-
-Example for integer values.
-timestamp-test-config += CONFIG_HAVE_MONOTONIC_TIMER=1
-
-Example for string values. Notice escaped quotes.
-spd_cache-test-config += CONFIG_SPD_CACHE_FMAP_NAME=\"SPD_CACHE_FMAP_NAME\"
-
-Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
-Change-Id: I1aeb78362c2609fbefbfd91c0f58ec19ed258ee1
-Reviewed-on: https://review.coreboot.org/c/coreboot/+/52937
-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
-Reviewed-by: Julius Werner <jwerner@chromium.org>
----
- tests/Makefile.inc | 22 ++++++++++++++++++----
- 1 file changed, 18 insertions(+), 4 deletions(-)
-
-diff --git a/tests/Makefile.inc b/tests/Makefile.inc
-index 44e3c69618..cd25e0f809 100644
---- a/tests/Makefile.inc
-+++ b/tests/Makefile.inc
-@@ -11,7 +11,7 @@ CMAKE:= cmake
-
- TEST_DEFAULT_CONFIG = $(top)/configs/config.emulation_qemu_x86_i440fx
- TEST_DOTCONFIG = $(testobj)/.config
--TEST_KCONFIG_AUTOHEADER := $(testobj)/config.h
-+TEST_KCONFIG_AUTOHEADER := $(testobj)/config.src.h
- TEST_KCONFIG_AUTOCONFIG := $(testobj)/auto.conf
- TEST_KCONFIG_DEPENDENCIES := $(testobj)/auto.conf.cmd
- TEST_KCONFIG_SPLITCONFIG := $(testobj)/config
-@@ -52,7 +52,7 @@ TEST_CFLAGS += -fno-pie -fno-pic
- TEST_LDFLAGS += -no-pie
-
- # Extra attributes for unit tests, declared per test
--attributes:= srcs cflags mocks stage
-+attributes:= srcs cflags config mocks stage
-
- stages:= decompressor bootblock romstage smm verstage
- stages+= ramstage rmodule postcar libagesa
-@@ -83,9 +83,23 @@ $(call evaluate_subdirs)
- # Create actual targets for unit test binaries
- # $1 - test name
- define TEST_CC_template
--$($(1)-objs): TEST_CFLAGS+= \
-+
-+# Generate custom config.h redefining given symbols
-+$(1)-config-file := $(obj)/$(1)/config.h
-+$$($(1)-config-file): $(TEST_KCONFIG_AUTOHEADER)
-+ mkdir -p $$(dir $$@)
-+ printf '// File generated by tests/Makefile.inc\n// Do not change\n' > $$@
-+ printf '#include <%s>\n\n' "$(notdir $(TEST_KCONFIG_AUTOHEADER))" >> $$@
-+ for kv in $$($(1)-config); do \
-+ key="`echo $$$$kv | cut -d '=' -f -1`"; \
-+ value="`echo $$$$kv | cut -d '=' -f 2-`"; \
-+ printf '#undef %s\n' "$$$$key" >> $$@; \
-+ printf '#define %s %s\n\n' "$$$$key" "$$$$value" >> $$@; \
-+ done
-+
-+$($(1)-objs): TEST_CFLAGS += -I$$(dir $$($(1)-config-file)) \
- -D__$$(shell echo $$($(1)-stage) | tr '[:lower:]' '[:upper:]')__
--$($(1)-objs): $(obj)/$(1)/%.o: $$$$*.c $(TEST_KCONFIG_AUTOHEADER)
-+$($(1)-objs): $(obj)/$(1)/%.o: $$$$*.c $$($(1)-config-file)
- mkdir -p $$(dir $$@)
- $(HOSTCC) $(HOSTCFLAGS) $$(TEST_CFLAGS) $($(1)-cflags) -MMD \
- -MT $$@ -c $$< -o $$@
---
-2.25.1
-