[lttng-dev] [PATCH v2 lttng-tools 5/5] Tests: Add health check tests to configure
Christian Babeux
christian.babeux at efficios.com
Tue Oct 2 14:20:04 EDT 2012
Add health folder to top-level tests Makefile.am.
Also add a runall script to run all health check tests.
Signed-off-by: Christian Babeux <christian.babeux at efficios.com>
---
configure.ac | 1 +
tests/tools/Makefile.am | 2 +-
tests/tools/health/runall | 28 ++++++++++++++++++++++++++++
3 files changed, 30 insertions(+), 1 deletion(-)
create mode 100755 tests/tools/health/runall
diff --git a/configure.ac b/configure.ac
index 36c137b..713daa9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -288,6 +288,7 @@ AC_CONFIG_FILES([
tests/kernel/Makefile
tests/tools/Makefile
tests/tools/streaming/Makefile
+ tests/tools/health/Makefile
tests/ust/Makefile
tests/ust/nprocesses/Makefile
tests/ust/high-throughput/Makefile
diff --git a/tests/tools/Makefile.am b/tests/tools/Makefile.am
index 3d25900..faa836c 100644
--- a/tests/tools/Makefile.am
+++ b/tests/tools/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = streaming
+SUBDIRS = streaming health
AM_CFLAGS = -g -Wall -I../
AM_LDFLAGS = -lurcu -lurcu-cds
diff --git a/tests/tools/health/runall b/tests/tools/health/runall
new file mode 100755
index 0000000..c22e353
--- /dev/null
+++ b/tests/tools/health/runall
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+DIR=$(dirname $0)
+
+tests=( $DIR/health_thread_exit $DIR/health_thread_stall )
+exit_code=0
+
+function start_tests ()
+{
+ for bin in ${tests[@]};
+ do
+ if [ ! -e $bin ]; then
+ echo -e "$bin not found, passing"
+ continue
+ fi
+
+ ./$bin
+ # Test must return 0 to pass.
+ if [ $? -ne 0 ]; then
+ exit_code=1
+ break
+ fi
+ done
+}
+
+start_tests
+
+exit $exit_code
--
1.7.12.1
More information about the lttng-dev
mailing list