From 9fe124bf1b7788058ecfe5778fea1660b01e3e9c Mon Sep 17 00:00:00 2001 From: Alan Maguire Date: Mon, 6 Jan 2020 22:28:22 +0000 Subject: kunit: allow kunit to be loaded as a module Making kunit itself buildable as a module allows for "always-on" kunit configuration; specifying CONFIG_KUNIT=m means the module is built but only used when loaded. Kunit test modules will load kunit.ko as an implicit dependency, so simply running "modprobe my-kunit-tests" will load the tests along with the kunit module and run them. Co-developed-by: Knut Omang Signed-off-by: Knut Omang Signed-off-by: Alan Maguire Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan --- lib/kunit/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/kunit/Makefile') diff --git a/lib/kunit/Makefile b/lib/kunit/Makefile index bc6e5e549e84..fab55649b69a 100644 --- a/lib/kunit/Makefile +++ b/lib/kunit/Makefile @@ -1,4 +1,6 @@ -obj-$(CONFIG_KUNIT) += test.o \ +obj-$(CONFIG_KUNIT) += kunit.o + +kunit-objs += test.o \ string-stream.o \ assert.o \ try-catch.o -- cgit v1.2.3