From: christian.babeux@efficios.com (Christian Babeux)
Subject: [lttng-dev] [PATCH lttng-tools 5/5] Tests: Add filtering tests to configure
Date: Tue, 16 Oct 2012 14:33:23 -0400 [thread overview]
Message-ID: <1350412403-9974-5-git-send-email-christian.babeux@efficios.com> (raw)
In-Reply-To: <1350412403-9974-1-git-send-email-christian.babeux@efficios.com>
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 at efficios.com>
---
configure.ac | 1 +
tests/tools/Makefile.am | 2 +-
tests/tools/filtering/Makefile.am | 4 ++--
tests/tools/filtering/runall | 28 ++++++++++++++++++++++++++++
tests/tools/runall.sh | 2 +-
5 files changed, 33 insertions(+), 4 deletions(-)
create mode 100755 tests/tools/filtering/runall
diff --git a/configure.ac b/configure.ac
index cb5dc38..fbaae6f 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/filtering/Makefile
tests/tools/health/Makefile
tests/ust/Makefile
tests/ust/nprocesses/Makefile
diff --git a/tests/tools/Makefile.am b/tests/tools/Makefile.am
index 173dce2..56eda3a 100644
--- a/tests/tools/Makefile.am
+++ b/tests/tools/Makefile.am
@@ -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
diff --git a/tests/tools/filtering/Makefile.am b/tests/tools/filtering/Makefile.am
index a3bf866..e1e715d 100644
--- a/tests/tools/filtering/Makefile.am
+++ b/tests/tools/filtering/Makefile.am
@@ -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
index 0000000..c92e399
--- /dev/null
+++ b/tests/tools/filtering/runall
@@ -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
diff --git a/tests/tools/runall.sh b/tests/tools/runall.sh
index 0ad7cf1..b2be91c 100755
--- a/tests/tools/runall.sh
+++ b/tests/tools/runall.sh
@@ -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
--
1.7.12.2
prev parent reply other threads:[~2012-10-16 18:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-16 18:33 [lttng-dev] [PATCH lttng-tools 1/5] Tests: Add an unsupported operators filtering test Christian Babeux
2012-10-16 18:33 ` [lttng-dev] [PATCH lttng-tools 2/5] Tests: Add a test for invalid filters Christian Babeux
2012-10-16 18:33 ` [lttng-dev] [PATCH lttng-tools 3/5] Tests: Add a trace statistics utility Christian Babeux
2012-10-16 18:33 ` [lttng-dev] [PATCH lttng-tools 4/5] Tests: Add a test for valid filters Christian Babeux
2012-10-16 18:33 ` Christian Babeux [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1350412403-9974-5-git-send-email-christian.babeux@efficios.com \
--to=christian.babeux@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox