From 15808db4a6b985240bd655e54ecb53c04e54fdad Mon Sep 17 00:00:00 2001 From: Robert Zieba Date: Mon, 6 Feb 2023 22:56:13 +0000 Subject: zephyr/test/skyrim: Add variant specific logs Register crystaldrift, markarth, and skyrim logs to match what the board code does. BRANCH=none BUG=b:247151116 TEST=Ran tests Change-Id: If92ce6e8e01a160ab75056952f23f69a3079022b Signed-off-by: Robert Zieba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4225007 Reviewed-by: Diana Z Commit-Queue: Diana Z --- zephyr/test/skyrim/CMakeLists.txt | 2 +- zephyr/test/skyrim/Kconfig | 4 ++++ zephyr/test/skyrim/src/common.c | 7 +++++++ zephyr/test/skyrim/src/crystaldrift/common.c | 3 +++ zephyr/test/skyrim/src/markarth/common.c | 3 +++ 5 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 zephyr/test/skyrim/src/common.c (limited to 'zephyr/test') diff --git a/zephyr/test/skyrim/CMakeLists.txt b/zephyr/test/skyrim/CMakeLists.txt index 9a07433f14..4d8155c76c 100644 --- a/zephyr/test/skyrim/CMakeLists.txt +++ b/zephyr/test/skyrim/CMakeLists.txt @@ -10,7 +10,7 @@ zephyr_include_directories("${PLATFORM_EC_PROGRAM_DIR}/skyrim/include") add_subdirectory(${PLATFORM_EC}/zephyr/test/test_utils test_utils) -target_sources(app PRIVATE src/${CONFIG_TEST_BOARD_NAME}/common.c) +target_sources(app PRIVATE src/common.c src/${CONFIG_TEST_BOARD_NAME}/common.c) target_sources_ifdef(CONFIG_TEST_BOARD_PPC_CONFIG app PRIVATE src/${CONFIG_TEST_BOARD_PPC_CONFIG_SRC} ${PLATFORM_EC_PROGRAM_DIR}/skyrim/${CONFIG_TEST_BOARD_NAME}/src/ppc_config.c) target_sources_ifdef(CONFIG_TEST_BOARD_USB_PD_POLICY app PRIVATE src/baseboard/usb_pd_policy.c ${PLATFORM_EC_PROGRAM_DIR}/skyrim/src/usb_pd_policy.c) diff --git a/zephyr/test/skyrim/Kconfig b/zephyr/test/skyrim/Kconfig index f4e8ed618a..4290f488e4 100644 --- a/zephyr/test/skyrim/Kconfig +++ b/zephyr/test/skyrim/Kconfig @@ -71,6 +71,10 @@ config TEST_BOARD_USB_MUX_CONFIG_SRC default "common/usb_mux_config.c" depends on TEST_BOARD_USB_MUX_CONFIG +config SKYRIM_LOG_LEVEL + int "Fake config to allow building" + default 4 # Log level debug by default + config TEST_ENABLE_USB_PD_HOST_CMD bool "Fake config to enable this feature" default n diff --git a/zephyr/test/skyrim/src/common.c b/zephyr/test/skyrim/src/common.c new file mode 100644 index 0000000000..b369d0bdaa --- /dev/null +++ b/zephyr/test/skyrim/src/common.c @@ -0,0 +1,7 @@ +/* Copyright 2023 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ +#include + +LOG_MODULE_REGISTER(skyrim, CONFIG_SKYRIM_LOG_LEVEL); diff --git a/zephyr/test/skyrim/src/crystaldrift/common.c b/zephyr/test/skyrim/src/crystaldrift/common.c index 841b7db140..9fa7864859 100644 --- a/zephyr/test/skyrim/src/crystaldrift/common.c +++ b/zephyr/test/skyrim/src/crystaldrift/common.c @@ -2,6 +2,9 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ +#include #include +LOG_MODULE_REGISTER(crystaldrift, CONFIG_SKYRIM_LOG_LEVEL); + ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); diff --git a/zephyr/test/skyrim/src/markarth/common.c b/zephyr/test/skyrim/src/markarth/common.c index 841b7db140..b302042761 100644 --- a/zephyr/test/skyrim/src/markarth/common.c +++ b/zephyr/test/skyrim/src/markarth/common.c @@ -2,6 +2,9 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ +#include #include +LOG_MODULE_REGISTER(markarth, CONFIG_SKYRIM_LOG_LEVEL); + ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); -- cgit v1.2.1