summaryrefslogtreecommitdiff
path: root/lib/kunit/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kunit/Makefile')
-rw-r--r--lib/kunit/Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/kunit/Makefile b/lib/kunit/Makefile
index 769d9402b5d3..bc6e5e549e84 100644
--- a/lib/kunit/Makefile
+++ b/lib/kunit/Makefile
@@ -3,7 +3,11 @@ obj-$(CONFIG_KUNIT) += test.o \
assert.o \
try-catch.o
-obj-$(CONFIG_KUNIT_TEST) += test-test.o \
- string-stream-test.o
+obj-$(CONFIG_KUNIT_TEST) += kunit-test.o
-obj-$(CONFIG_KUNIT_EXAMPLE_TEST) += example-test.o
+# string-stream-test compiles built-in only.
+ifeq ($(CONFIG_KUNIT_TEST),y)
+obj-$(CONFIG_KUNIT_TEST) += string-stream-test.o
+endif
+
+obj-$(CONFIG_KUNIT_EXAMPLE_TEST) += kunit-example-test.o