Tests: Add health check tests to configure
authorChristian Babeux <christian.babeux@efficios.com>
Tue, 2 Oct 2012 18:20:04 +0000 (14:20 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 2 Oct 2012 20:32:40 +0000 (16:32 -0400)
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@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
.gitignore
configure.ac
tests/tools/Makefile.am
tests/tools/health/runall [new file with mode: 0755]
tests/tools/runall.sh

index 5a04dc26efab871734395f92c290c426b3847234..8e5fc9c449d1d005b19865bbc3a325d3560d9736 100644 (file)
@@ -60,5 +60,6 @@ gen-events-time
 gen-events
 gen-ust-events
 unit_tests
+health_check
 
 benchmark/
index f33f9e6bd20f34a44d7eb864eb6ac1efb2596887..cb5dc38914cb9947dd33031c07df06c0ce320507 100644 (file)
@@ -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
index 3d2590092f69633f62871c08075ad07284420ec0..faa836ca6642a1b54b7666dd1d1f16af4103f7bd 100644 (file)
@@ -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 (executable)
index 0000000..c22e353
--- /dev/null
@@ -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
index ca44fef0e7b96d23dad9d7305c9496d9766cfdba..0ad7cf17a4fb7e47ec32646edb906eb5c6e49149 100755 (executable)
@@ -3,7 +3,7 @@
 DIR=$(dirname $0)
 
 tests=( $DIR/test_kernel_data_trace $DIR/test_sessions $DIR/test_ust_data_trace \
-               $DIR/streaming/runall )
+               $DIR/streaming/runall $DIR/health/runall )
 
 exit_code=0
 
This page took 0.03701 seconds and 4 git commands to generate.