public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] selftests: New very basic kernel selftests directory
@ 2011-12-02 15:41 Frederic Weisbecker
  2011-12-02 15:41 ` [PATCH 2/2] selftests: New x86 breakpoints selftest Frederic Weisbecker
  2012-01-13 18:54 ` [PATCH 1/2] selftests: New very basic kernel selftests directory Fubo Chen
  0 siblings, 2 replies; 7+ messages in thread
From: Frederic Weisbecker @ 2011-12-02 15:41 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML, Frederic Weisbecker

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 <akpm@linux-foundation.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
 tools/testing/selftests/Makefile  |   11 +++++++++++
 tools/testing/selftests/run_tests |    8 ++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)
 create mode 100644 tools/testing/selftests/Makefile
 create mode 100755 tools/testing/selftests/run_tests

diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
new file mode 100644
index 0000000..298a5c0
--- /dev/null
+++ b/tools/testing/selftests/Makefile
@@ -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 100755
index 0000000..701960d
--- /dev/null
+++ b/tools/testing/selftests/run_tests
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+TARGETS=
+
+for TARGET in $TARGETS
+do
+	$TARGET/run_test
+done
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-17  1:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02 15:41 [PATCH 1/2] selftests: New very basic kernel selftests directory Frederic Weisbecker
2011-12-02 15:41 ` [PATCH 2/2] selftests: New x86 breakpoints selftest Frederic Weisbecker
2011-12-07 23:32   ` Andrew Morton
2011-12-08  0:11     ` Frederic Weisbecker
2011-12-12  6:06   ` K.Prasad
2012-01-13 18:54 ` [PATCH 1/2] selftests: New very basic kernel selftests directory Fubo Chen
2012-01-17  1:49   ` Frederic Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox