From: Tzung-Bi Shih Date: Tue, 3 Oct 2023 08:05:15 +0000 (+0000) Subject: platform/chrome: kunit: make EC protocol tests independent X-Git-Tag: v6.7-rc1~151^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=466f70fb1b10fd139582646285e587fb38a9ff2c;p=thirdparty%2Fkernel%2Flinux.git platform/chrome: kunit: make EC protocol tests independent Remove CONFIG_CROS_KUNIT and common code concept for ChromeOS Kunit but make it bundle to ChromeOS EC protocol tests. Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231003080515.4011374-1-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih --- diff --git a/drivers/platform/chrome/Kconfig b/drivers/platform/chrome/Kconfig index 7d82a0946e1c8..7a83346bfa53d 100644 --- a/drivers/platform/chrome/Kconfig +++ b/drivers/platform/chrome/Kconfig @@ -299,12 +299,12 @@ config CROS_TYPEC_SWITCH source "drivers/platform/chrome/wilco_ec/Kconfig" # Kunit test cases -config CROS_KUNIT - tristate "Kunit tests for ChromeOS" if !KUNIT_ALL_TESTS +config CROS_KUNIT_EC_PROTO_TEST + tristate "Kunit tests for ChromeOS EC protocol" if !KUNIT_ALL_TESTS depends on KUNIT && CROS_EC default KUNIT_ALL_TESTS select CROS_EC_PROTO help - ChromeOS Kunit tests. + Kunit tests for ChromeOS EC protocol. endif # CHROMEOS_PLATFORMS diff --git a/drivers/platform/chrome/Makefile b/drivers/platform/chrome/Makefile index 9e26e45c4a375..2dcc6ccc23022 100644 --- a/drivers/platform/chrome/Makefile +++ b/drivers/platform/chrome/Makefile @@ -36,6 +36,5 @@ obj-$(CONFIG_CROS_USBPD_NOTIFY) += cros_usbpd_notify.o obj-$(CONFIG_WILCO_EC) += wilco_ec/ # Kunit test cases -obj-$(CONFIG_CROS_KUNIT) += cros_kunit.o -cros_kunit-objs := cros_kunit_util.o -cros_kunit-objs += cros_ec_proto_test.o +obj-$(CONFIG_CROS_KUNIT_EC_PROTO_TEST) += cros_kunit_proto_test.o +cros_kunit_proto_test-objs := cros_ec_proto_test_util.o cros_ec_proto_test.o diff --git a/drivers/platform/chrome/cros_ec_proto_test.c b/drivers/platform/chrome/cros_ec_proto_test.c index 63e38671e95a6..b6169d6f24677 100644 --- a/drivers/platform/chrome/cros_ec_proto_test.c +++ b/drivers/platform/chrome/cros_ec_proto_test.c @@ -11,7 +11,7 @@ #include #include "cros_ec.h" -#include "cros_kunit_util.h" +#include "cros_ec_proto_test_util.h" #define BUFSIZE 512 diff --git a/drivers/platform/chrome/cros_kunit_util.c b/drivers/platform/chrome/cros_ec_proto_test_util.c similarity index 98% rename from drivers/platform/chrome/cros_kunit_util.c rename to drivers/platform/chrome/cros_ec_proto_test_util.c index f0fda96b11bd5..65d328bcd6eb2 100644 --- a/drivers/platform/chrome/cros_kunit_util.c +++ b/drivers/platform/chrome/cros_ec_proto_test_util.c @@ -11,7 +11,7 @@ #include #include "cros_ec.h" -#include "cros_kunit_util.h" +#include "cros_ec_proto_test_util.h" int cros_kunit_ec_xfer_mock_default_result; int cros_kunit_ec_xfer_mock_default_ret; @@ -126,5 +126,3 @@ void cros_kunit_mock_reset(void) cros_kunit_readmem_mock_data = NULL; cros_kunit_readmem_mock_ret = 0; } - -MODULE_LICENSE("GPL"); diff --git a/drivers/platform/chrome/cros_kunit_util.h b/drivers/platform/chrome/cros_ec_proto_test_util.h similarity index 100% rename from drivers/platform/chrome/cros_kunit_util.h rename to drivers/platform/chrome/cros_ec_proto_test_util.h