Skip to content

Commit 466f70f

Browse files
author
Tzung-Bi Shih
committed
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tzung-Bi Shih <[email protected]>
1 parent e410b4a commit 466f70f

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

drivers/platform/chrome/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,12 @@ config CROS_TYPEC_SWITCH
299299
source "drivers/platform/chrome/wilco_ec/Kconfig"
300300

301301
# Kunit test cases
302-
config CROS_KUNIT
303-
tristate "Kunit tests for ChromeOS" if !KUNIT_ALL_TESTS
302+
config CROS_KUNIT_EC_PROTO_TEST
303+
tristate "Kunit tests for ChromeOS EC protocol" if !KUNIT_ALL_TESTS
304304
depends on KUNIT && CROS_EC
305305
default KUNIT_ALL_TESTS
306306
select CROS_EC_PROTO
307307
help
308-
ChromeOS Kunit tests.
308+
Kunit tests for ChromeOS EC protocol.
309309

310310
endif # CHROMEOS_PLATFORMS

drivers/platform/chrome/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,5 @@ obj-$(CONFIG_CROS_USBPD_NOTIFY) += cros_usbpd_notify.o
3636
obj-$(CONFIG_WILCO_EC) += wilco_ec/
3737

3838
# Kunit test cases
39-
obj-$(CONFIG_CROS_KUNIT) += cros_kunit.o
40-
cros_kunit-objs := cros_kunit_util.o
41-
cros_kunit-objs += cros_ec_proto_test.o
39+
obj-$(CONFIG_CROS_KUNIT_EC_PROTO_TEST) += cros_kunit_proto_test.o
40+
cros_kunit_proto_test-objs := cros_ec_proto_test_util.o cros_ec_proto_test.o

drivers/platform/chrome/cros_ec_proto_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <linux/platform_data/cros_ec_proto.h>
1212

1313
#include "cros_ec.h"
14-
#include "cros_kunit_util.h"
14+
#include "cros_ec_proto_test_util.h"
1515

1616
#define BUFSIZE 512
1717

drivers/platform/chrome/cros_kunit_util.c renamed to drivers/platform/chrome/cros_ec_proto_test_util.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <linux/platform_data/cros_ec_proto.h>
1212

1313
#include "cros_ec.h"
14-
#include "cros_kunit_util.h"
14+
#include "cros_ec_proto_test_util.h"
1515

1616
int cros_kunit_ec_xfer_mock_default_result;
1717
int cros_kunit_ec_xfer_mock_default_ret;
@@ -126,5 +126,3 @@ void cros_kunit_mock_reset(void)
126126
cros_kunit_readmem_mock_data = NULL;
127127
cros_kunit_readmem_mock_ret = 0;
128128
}
129-
130-
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)