diff options
author | Robert Zieba <robertzieba@google.com> | 2023-02-06 22:56:13 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-02-07 18:40:56 +0000 |
commit | 15808db4a6b985240bd655e54ecb53c04e54fdad (patch) | |
tree | 6ccf3ec4e95e7825bc798dfaaf253b80d92502a8 /zephyr/test | |
parent | dd96a625e5afc3d93492e060975bc63d5b3fb794 (diff) | |
download | chrome-ec-15808db4a6b985240bd655e54ecb53c04e54fdad.tar.gz |
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 <robertzieba@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4225007
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'zephyr/test')
-rw-r--r-- | zephyr/test/skyrim/CMakeLists.txt | 2 | ||||
-rw-r--r-- | zephyr/test/skyrim/Kconfig | 4 | ||||
-rw-r--r-- | zephyr/test/skyrim/src/common.c | 7 | ||||
-rw-r--r-- | zephyr/test/skyrim/src/crystaldrift/common.c | 3 | ||||
-rw-r--r-- | zephyr/test/skyrim/src/markarth/common.c | 3 |
5 files changed, 18 insertions, 1 deletions
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 <zephyr/logging/log.h> + +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 <zephyr/logging/log.h> #include <zephyr/ztest.h> +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 <zephyr/logging/log.h> #include <zephyr/ztest.h> +LOG_MODULE_REGISTER(markarth, CONFIG_SKYRIM_LOG_LEVEL); + ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); |