From 04e240aca4dfe2beab2d3c27048ea0321b92d6b9 Mon Sep 17 00:00:00 2001 From: Robert Zieba Date: Fri, 17 Feb 2023 17:35:15 +0000 Subject: zephyr/test/skyrim: Finish general refactor Finish general refactor by moving remaining variant-specific code. BRANCH=none BUG=b:247151116 TEST=Ran skyrim tests Change-Id: I8c7f1c612292e96a66daf0df08e968c39293b168 Signed-off-by: Robert Zieba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4263560 Reviewed-by: Abe Levkoy --- zephyr/test/skyrim/CMakeLists.txt | 5 +++-- zephyr/test/skyrim/src/baseboard/common.c | 7 ------- zephyr/test/skyrim/src/crystaldrift/common.c | 10 ---------- zephyr/test/skyrim/src/frostflow/common.c | 7 ------- zephyr/test/skyrim/src/markarth/common.c | 10 ---------- zephyr/test/skyrim/src/skyrim/common.c | 7 ------- zephyr/test/skyrim/src/winterhold/common.c | 7 ------- zephyr/test/skyrim/tests/baseboard/CMakeLists.txt | 1 + zephyr/test/skyrim/tests/baseboard/src/common.c | 7 +++++++ zephyr/test/skyrim/tests/crystaldrift/CMakeLists.txt | 5 +++++ zephyr/test/skyrim/tests/crystaldrift/src/common.c | 10 ++++++++++ zephyr/test/skyrim/tests/frostflow/CMakeLists.txt | 1 + zephyr/test/skyrim/tests/frostflow/src/common.c | 7 +++++++ zephyr/test/skyrim/tests/markarth/CMakeLists.txt | 5 +++++ zephyr/test/skyrim/tests/markarth/src/common.c | 10 ++++++++++ zephyr/test/skyrim/tests/skyrim/CMakeLists.txt | 5 +++++ zephyr/test/skyrim/tests/skyrim/src/common.c | 7 +++++++ zephyr/test/skyrim/tests/winterhold/CMakeLists.txt | 1 + zephyr/test/skyrim/tests/winterhold/src/common.c | 7 +++++++ 19 files changed, 69 insertions(+), 50 deletions(-) delete mode 100644 zephyr/test/skyrim/src/baseboard/common.c delete mode 100644 zephyr/test/skyrim/src/crystaldrift/common.c delete mode 100644 zephyr/test/skyrim/src/frostflow/common.c delete mode 100644 zephyr/test/skyrim/src/markarth/common.c delete mode 100644 zephyr/test/skyrim/src/skyrim/common.c delete mode 100644 zephyr/test/skyrim/src/winterhold/common.c create mode 100644 zephyr/test/skyrim/tests/baseboard/src/common.c create mode 100644 zephyr/test/skyrim/tests/crystaldrift/CMakeLists.txt create mode 100644 zephyr/test/skyrim/tests/crystaldrift/src/common.c create mode 100644 zephyr/test/skyrim/tests/frostflow/src/common.c create mode 100644 zephyr/test/skyrim/tests/markarth/CMakeLists.txt create mode 100644 zephyr/test/skyrim/tests/markarth/src/common.c create mode 100644 zephyr/test/skyrim/tests/skyrim/CMakeLists.txt create mode 100644 zephyr/test/skyrim/tests/skyrim/src/common.c create mode 100644 zephyr/test/skyrim/tests/winterhold/src/common.c diff --git a/zephyr/test/skyrim/CMakeLists.txt b/zephyr/test/skyrim/CMakeLists.txt index 25eb4a333a..e7a3c4fdb3 100644 --- a/zephyr/test/skyrim/CMakeLists.txt +++ b/zephyr/test/skyrim/CMakeLists.txt @@ -12,7 +12,8 @@ add_subdirectory(${PLATFORM_EC}/zephyr/test/test_utils test_utils) add_subdirectory(tests/common) add_subdirectory_ifdef(CONFIG_TEST_BOARD_BASEBOARD tests/baseboard) +add_subdirectory_ifdef(CONFIG_TEST_BOARD_CRYSTALDRIFT tests/crystaldrift) add_subdirectory_ifdef(CONFIG_TEST_BOARD_FROSTFLOW tests/frostflow) +add_subdirectory_ifdef(CONFIG_TEST_BOARD_MARKARTH tests/markarth) +add_subdirectory_ifdef(CONFIG_TEST_BOARD_SKYRIM tests/skyrim) add_subdirectory_ifdef(CONFIG_TEST_BOARD_WINTERHOLD tests/winterhold) - -target_sources(app PRIVATE src/${CONFIG_TEST_BOARD_NAME}/common.c) diff --git a/zephyr/test/skyrim/src/baseboard/common.c b/zephyr/test/skyrim/src/baseboard/common.c deleted file mode 100644 index 841b7db140..0000000000 --- a/zephyr/test/skyrim/src/baseboard/common.c +++ /dev/null @@ -1,7 +0,0 @@ -/* 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 - -ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); diff --git a/zephyr/test/skyrim/src/crystaldrift/common.c b/zephyr/test/skyrim/src/crystaldrift/common.c deleted file mode 100644 index 9fa7864859..0000000000 --- a/zephyr/test/skyrim/src/crystaldrift/common.c +++ /dev/null @@ -1,10 +0,0 @@ -/* 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 -#include - -LOG_MODULE_REGISTER(crystaldrift, CONFIG_SKYRIM_LOG_LEVEL); - -ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); diff --git a/zephyr/test/skyrim/src/frostflow/common.c b/zephyr/test/skyrim/src/frostflow/common.c deleted file mode 100644 index 841b7db140..0000000000 --- a/zephyr/test/skyrim/src/frostflow/common.c +++ /dev/null @@ -1,7 +0,0 @@ -/* 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 - -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 deleted file mode 100644 index b302042761..0000000000 --- a/zephyr/test/skyrim/src/markarth/common.c +++ /dev/null @@ -1,10 +0,0 @@ -/* 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 -#include - -LOG_MODULE_REGISTER(markarth, CONFIG_SKYRIM_LOG_LEVEL); - -ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); diff --git a/zephyr/test/skyrim/src/skyrim/common.c b/zephyr/test/skyrim/src/skyrim/common.c deleted file mode 100644 index 841b7db140..0000000000 --- a/zephyr/test/skyrim/src/skyrim/common.c +++ /dev/null @@ -1,7 +0,0 @@ -/* 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 - -ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); diff --git a/zephyr/test/skyrim/src/winterhold/common.c b/zephyr/test/skyrim/src/winterhold/common.c deleted file mode 100644 index 841b7db140..0000000000 --- a/zephyr/test/skyrim/src/winterhold/common.c +++ /dev/null @@ -1,7 +0,0 @@ -/* 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 - -ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); diff --git a/zephyr/test/skyrim/tests/baseboard/CMakeLists.txt b/zephyr/test/skyrim/tests/baseboard/CMakeLists.txt index 09db535985..06d1d0e72f 100644 --- a/zephyr/test/skyrim/tests/baseboard/CMakeLists.txt +++ b/zephyr/test/skyrim/tests/baseboard/CMakeLists.txt @@ -2,4 +2,5 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +target_sources(app PRIVATE src/common.c) target_sources_ifdef(CONFIG_TEST_BOARD_USB_PD_POLICY app PRIVATE src/usb_pd_policy.c ${PLATFORM_EC_PROGRAM_DIR}/skyrim/src/usb_pd_policy.c) \ No newline at end of file diff --git a/zephyr/test/skyrim/tests/baseboard/src/common.c b/zephyr/test/skyrim/tests/baseboard/src/common.c new file mode 100644 index 0000000000..841b7db140 --- /dev/null +++ b/zephyr/test/skyrim/tests/baseboard/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 + +ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); diff --git a/zephyr/test/skyrim/tests/crystaldrift/CMakeLists.txt b/zephyr/test/skyrim/tests/crystaldrift/CMakeLists.txt new file mode 100644 index 0000000000..e78711fed2 --- /dev/null +++ b/zephyr/test/skyrim/tests/crystaldrift/CMakeLists.txt @@ -0,0 +1,5 @@ +# 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. + +target_sources(app PRIVATE src/common.c) diff --git a/zephyr/test/skyrim/tests/crystaldrift/src/common.c b/zephyr/test/skyrim/tests/crystaldrift/src/common.c new file mode 100644 index 0000000000..9fa7864859 --- /dev/null +++ b/zephyr/test/skyrim/tests/crystaldrift/src/common.c @@ -0,0 +1,10 @@ +/* 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 +#include + +LOG_MODULE_REGISTER(crystaldrift, CONFIG_SKYRIM_LOG_LEVEL); + +ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); diff --git a/zephyr/test/skyrim/tests/frostflow/CMakeLists.txt b/zephyr/test/skyrim/tests/frostflow/CMakeLists.txt index c195c83093..539890dcd7 100644 --- a/zephyr/test/skyrim/tests/frostflow/CMakeLists.txt +++ b/zephyr/test/skyrim/tests/frostflow/CMakeLists.txt @@ -2,4 +2,5 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +target_sources(app PRIVATE src/common.c) target_sources_ifdef(CONFIG_TEST_BOARD_USB_MUX_CONFIG app PRIVATE src/usb_mux_config.c) \ No newline at end of file diff --git a/zephyr/test/skyrim/tests/frostflow/src/common.c b/zephyr/test/skyrim/tests/frostflow/src/common.c new file mode 100644 index 0000000000..841b7db140 --- /dev/null +++ b/zephyr/test/skyrim/tests/frostflow/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 + +ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); diff --git a/zephyr/test/skyrim/tests/markarth/CMakeLists.txt b/zephyr/test/skyrim/tests/markarth/CMakeLists.txt new file mode 100644 index 0000000000..e78711fed2 --- /dev/null +++ b/zephyr/test/skyrim/tests/markarth/CMakeLists.txt @@ -0,0 +1,5 @@ +# 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. + +target_sources(app PRIVATE src/common.c) diff --git a/zephyr/test/skyrim/tests/markarth/src/common.c b/zephyr/test/skyrim/tests/markarth/src/common.c new file mode 100644 index 0000000000..b302042761 --- /dev/null +++ b/zephyr/test/skyrim/tests/markarth/src/common.c @@ -0,0 +1,10 @@ +/* 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 +#include + +LOG_MODULE_REGISTER(markarth, CONFIG_SKYRIM_LOG_LEVEL); + +ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); diff --git a/zephyr/test/skyrim/tests/skyrim/CMakeLists.txt b/zephyr/test/skyrim/tests/skyrim/CMakeLists.txt new file mode 100644 index 0000000000..e78711fed2 --- /dev/null +++ b/zephyr/test/skyrim/tests/skyrim/CMakeLists.txt @@ -0,0 +1,5 @@ +# 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. + +target_sources(app PRIVATE src/common.c) diff --git a/zephyr/test/skyrim/tests/skyrim/src/common.c b/zephyr/test/skyrim/tests/skyrim/src/common.c new file mode 100644 index 0000000000..841b7db140 --- /dev/null +++ b/zephyr/test/skyrim/tests/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 + +ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); diff --git a/zephyr/test/skyrim/tests/winterhold/CMakeLists.txt b/zephyr/test/skyrim/tests/winterhold/CMakeLists.txt index b45811b826..673b09bdcd 100644 --- a/zephyr/test/skyrim/tests/winterhold/CMakeLists.txt +++ b/zephyr/test/skyrim/tests/winterhold/CMakeLists.txt @@ -2,4 +2,5 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +target_sources(app PRIVATE src/common.c) target_sources_ifdef(CONFIG_TEST_BOARD_PPC_CONFIG app PRIVATE src/ppc_config.c) \ No newline at end of file diff --git a/zephyr/test/skyrim/tests/winterhold/src/common.c b/zephyr/test/skyrim/tests/winterhold/src/common.c new file mode 100644 index 0000000000..841b7db140 --- /dev/null +++ b/zephyr/test/skyrim/tests/winterhold/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 + +ZTEST_SUITE(common, NULL, NULL, NULL, NULL, NULL); -- cgit v1.2.1