tests: Move the console stubs to a dedicated directory
Move the console functions definitions out from lib/b64_decode code to a dedicated directory. Signed-off-by: Anna Karas <aka@semihalf.com> Change-Id: I22a6a592f0d4d509f19920f4ad2b18e8ed83a03e Reviewed-on: https://review.coreboot.org/c/coreboot/+/43285 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
parent
478d47f777
commit
f7cd0d5a05
|
@ -8,6 +8,7 @@ string-test-srcs += tests/lib/string-test.c
|
||||||
string-test-srcs += src/lib/string.c
|
string-test-srcs += src/lib/string.c
|
||||||
|
|
||||||
b64_decode-test-srcs += tests/lib/b64_decode-test.c
|
b64_decode-test-srcs += tests/lib/b64_decode-test.c
|
||||||
|
b64_decode-test-srcs += tests/stubs/console.c
|
||||||
b64_decode-test-srcs += src/lib/b64_decode.c
|
b64_decode-test-srcs += src/lib/b64_decode.c
|
||||||
|
|
||||||
hexstrtobin-test-srcs += tests/lib/hexstrtobin-test.c
|
hexstrtobin-test-srcs += tests/lib/hexstrtobin-test.c
|
||||||
|
|
|
@ -24,12 +24,6 @@ const char *invalid[] = {
|
||||||
"SGVsbG-8="
|
"SGVsbG-8="
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Provide necessary definition in order to satisfy dependencies. */
|
|
||||||
int do_printk(int msg_level, const char *fmt, ...)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void test_b64_decode(void **state)
|
static void test_b64_decode(void **state)
|
||||||
{
|
{
|
||||||
uint8_t *decoded;
|
uint8_t *decoded;
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <console/console.h>
|
||||||
|
|
||||||
|
int do_printk(int msg_level, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int do_vprintk(int msg_level, const char *fmt, va_list args)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue