selftests: new very basic kernel selftests directory
authorFrederic Weisbecker <[email protected]>
Fri, 13 Jan 2012 01:20:44 +0000 (17:20 -0800)
committerLinus Torvalds <[email protected]>
Fri, 13 Jan 2012 04:13:12 +0000 (20:13 -0800)
Bring a new kernel selftests directory in tools/testing/selftests.  To
add a new selftest, create a subdirectory with the sources and a
makefile that creates a target named "run_test" then add the
subdirectory name to the TARGET var in tools/testing/selftests/Makefile
and tools/testing/selftests/run_tests script.

This can help centralizing and maintaining any useful selftest that
developers usually tend to let rust in peace on some random server.

Suggested-by: Andrew Morton <[email protected]>
Signed-off-by: Frederic Weisbecker <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Jason Wessel <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Michal Marek <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
tools/testing/selftests/Makefile [new file with mode: 0644]
tools/testing/selftests/run_tests [new file with mode: 0644]

diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
new file mode 100644 (file)
index 0000000..298a5c0
--- /dev/null
@@ -0,0 +1,11 @@
+TARGETS =
+
+all:
+       for TARGET in $(TARGETS); do \
+               make -C $$TARGET; \
+       done;
+
+clean:
+       for TARGET in $(TARGETS); do \
+               make -C $$TARGET clean; \
+       done;
diff --git a/tools/testing/selftests/run_tests b/tools/testing/selftests/run_tests
new file mode 100644 (file)
index 0000000..701960d
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+TARGETS=
+
+for TARGET in $TARGETS
+do
+       $TARGET/run_test
+done