Skip to contentSkip to conversation

Tests: Add health check tests to configure

PATCH Superseded Christian Babeux 1 participant 1 message Oct 2, 2012 1 message not in the archive

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v2 5/5 Tests: Add health check tests to configure

Add health folder to top-level tests Makefile.am. Also add a runall script to run all health check tests.

---
 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
configure.ac +1 -0
index 36c137b..713daa9 100644
@@ -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
tests/tools/Makefile.am +1 -1
index 3d25900..faa836c 100644
@@ -1,4 +1,4 @@
-SUBDIRS = streaming
+SUBDIRS = streaming health
 
 AM_CFLAGS = -g -Wall -I../
 AM_LDFLAGS = -lurcu -lurcu-cds
tests/tools/health/runall new file +28 -0
new file mode 100755
index 0000000..c22e353
@@ -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
Signature · 1 line
1.7.12.1