From bbdfa72a0a5f8d5a8dd4a47e67195504a22ece5b Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 9 Mar 2021 11:56:31 -0500 Subject: Add some test cases, and make "make test" actually work. Note the one test case I'm not 100% sure about. Someone let me know. Signed-off-by: Peter Jones --- include/console.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/console.h') diff --git a/include/console.h b/include/console.h index 00982744..036262ef 100644 --- a/include/console.h +++ b/include/console.h @@ -92,6 +92,7 @@ struct _EFI_CONSOLE_CONTROL_PROTOCOL { extern VOID console_fini(VOID); extern VOID setup_verbosity(VOID); extern UINT32 verbose; +#ifndef SHIM_UNIT_TEST #define dprint_(fmt, ...) ({ \ UINTN __dprint_ret = 0; \ if (verbose) \ @@ -101,6 +102,11 @@ extern UINT32 verbose; #define dprint(fmt, ...) \ dprint_(L"%a:%d:%a() " fmt, __FILE__, __LINE__ - 1, __func__, \ ##__VA_ARGS__) +#else +#define dprint_(...) +#define dprint(fmt, ...) +#endif + extern EFI_STATUS EFIAPI vdprint_(const CHAR16 *fmt, const char *file, int line, const char *func, va_list args); #define vdprint(fmt, ...) \ -- cgit v1.2.3