Add mocks for common debug features
tf_log and do_panic calls can be tested through the functions of
common/mock_debug.h. The console driver dependency has been removed.
Change-Id: I3a0da45c851aee4ae7a8599e21816237d9932e72
Signed-off-by: Imre Kis <imre.kis@arm.com>
diff --git a/mocks/include/common/mock_debug.h b/mocks/include/common/mock_debug.h
new file mode 100644
index 0000000..cf6f711
--- /dev/null
+++ b/mocks/include/common/mock_debug.h
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <setjmp.h>
+
+typedef jmp_buf panic_environment_t;
+
+#define SETUP_PANIC_ENVIRONMENT(env) (expect_panic(&env) && (setjmp(env) == 0))
+
+int expect_panic(panic_environment_t *env);
+void expect_tf_log(const char *str);