Tests: Add filtering tests to configure
authorChristian Babeux <christian.babeux@efficios.com>
Tue, 16 Oct 2012 18:33:23 +0000 (14:33 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Fri, 19 Oct 2012 19:20:40 +0000 (15:20 -0400)
Add filtering folder to top-level Makefile.am. Also add a runall script
to run all filtering tests.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
configure.ac
tests/tools/Makefile.am
tests/tools/filtering/Makefile.am
tests/tools/filtering/runall [new file with mode: 0755]
tests/tools/runall.sh

index cb5dc38914cb9947dd33031c07df06c0ce320507..fbaae6f865d058900f43c91e00f63399fc7e89f7 100644 (file)
@@ -288,6 +288,7 @@ AC_CONFIG_FILES([
        tests/kernel/Makefile
        tests/tools/Makefile
        tests/tools/streaming/Makefile
+       tests/tools/filtering/Makefile
        tests/tools/health/Makefile
        tests/ust/Makefile
        tests/ust/nprocesses/Makefile
index 173dce21fff3beffa7e917e54487e64aa754202a..56eda3adae64e25710cce4e83c3bae5d62166f21 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = streaming health
+SUBDIRS = streaming filtering health
 
 AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests -g -Wall
 AM_LDFLAGS = -lurcu -lurcu-cds
index a3bf8666d7a0846bbcbf427f68955add472715b0..e1e715da49f23a9fdf129f607fcce1c3316a0f71 100644 (file)
@@ -14,5 +14,5 @@ gen_ust_events_SOURCES = gen-ust-events.c tp.c tp.h
 gen_ust_events_LDADD = -llttng-ust
 endif
 
-noinst_SCRIPTS = unsupported-ops invalid-filters valid-filters babelstats.pl
-EXTRA_DIST = unsupported-ops invalid-filters valid-filters babelstats.pl
+noinst_SCRIPTS = runall unsupported-ops invalid-filters valid-filters babelstats.pl
+EXTRA_DIST = runall unsupported-ops invalid-filters valid-filters babelstats.pl
diff --git a/tests/tools/filtering/runall b/tests/tools/filtering/runall
new file mode 100755 (executable)
index 0000000..c92e399
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+DIR=$(dirname $0)
+
+tests=( $DIR/unsupported-ops $DIR/invalid-filters $DIR/valid-filters )
+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 0ad7cf17a4fb7e47ec32646edb906eb5c6e49149..b2be91c6ca0282460f43b4e5c191692fcff8fa4d 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/health/runall )
+               $DIR/streaming/runall $DIR/health/runall $DIR/filtering/runall)
 
 exit_code=0
 
This page took 0.027407 seconds and 4 git commands to generate.