summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuah Khan <shuah.kh@samsung.com>2014-08-07 23:07:46 +0400
committerMichal Marek <mmarek@suse.cz>2014-08-08 00:30:01 +0400
commit5a5da78b3a48120d942c8a18ecc645f6acdf7da6 (patch)
tree44a983904da4b99603946df7c9997da6c04b83f6
parent5be1df668a40cc0a49bc26023fffc537fae1778e (diff)
downloadlinux-5a5da78b3a48120d942c8a18ecc645f6acdf7da6.tar.xz
kbuild: kselftest - new make target to build and run kernel selftests
Add a new make target "kselftest" to enable kernel testing. This new target builds and runs kernel selftests. Running as root is recommended for a complete test run as some tests don't run when run by non-root user. Build, install, and boot kernel before running kselftest on it. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 284071c59477..2ca7d189618d 100644
--- a/Makefile
+++ b/Makefile
@@ -1028,6 +1028,13 @@ headers_check: headers_install
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
# ---------------------------------------------------------------------------
+# Kernel selftest
+
+PHONY += kselftest
+kselftest:
+ $(Q)$(MAKE) -C tools/testing/selftests run_tests
+
+# ---------------------------------------------------------------------------
# Modules
ifdef CONFIG_MODULES
@@ -1230,6 +1237,11 @@ help:
@echo ' headerdep - Detect inclusion cycles in headers'
@$(MAKE) -f $(srctree)/scripts/Makefile.help checker-help
@echo ''
+ @echo 'Kernel selftest'
+ @echo ' kselftest - Build and run kernel selftest (run as root)'
+ @echo ' Build, install, and boot kernel before'
+ @echo ' running kselftest on it'
+ @echo ''
@echo 'Kernel packaging:'
@$(MAKE) $(build)=$(package-dir) help
@echo ''