Also remove old the old runner scripts.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
SUBDIRS = streaming filtering health
-AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/utils -g -Wall
-AM_LDFLAGS = -lurcu
-
-EXTRA_DIST = runall.sh
+EXTRA_DIST = run.sh
gen_ust_events_LDADD = -llttng-ust
endif
-noinst_SCRIPTS = runall test_unsupported_op test_invalid_filter test_valid_filter babelstats.pl
-EXTRA_DIST = runall test_unsupported_op test_invalid_filter test_valid_filter babelstats.pl
+noinst_SCRIPTS = test_unsupported_op test_invalid_filter test_valid_filter babelstats.pl
+EXTRA_DIST = test_unsupported_op test_invalid_filter test_valid_filter babelstats.pl
+++ /dev/null
-#!/bin/bash
-
-DIR=$(dirname $0)
-
-tests=( $DIR/test_unsupported_op $DIR/test_invalid_filter $DIR/test_valid_filter )
-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
health_check_LDADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
$(top_builddir)/src/common/libcommon.la
endif
-
-noinst_SCRIPTS = runall
-EXTRA_DIST = runall
+++ /dev/null
-#!/bin/bash
-
-DIR=$(dirname $0)
-
-tests=( $DIR/test_thread_exit $DIR/test_thread_stall $DIR/test_tp_fail)
-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
-}
-
-if [ "$(id -u)" != "0" ]; then
- echo -e "Need root for health test."
- exit 0
-fi
-
-start_tests
-
-exit $exit_code
--- /dev/null
+#!/bin/bash
+#
+# Copyright (C) 2013 - Christian Babeux <christian.babeux@efficios.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; only version 2
+# of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+DIR=$(dirname $0)
+TESTDIR=$DIR/../..
+source $TESTDIR/utils/runner.sh
+
+#### ADD TESTS HERE ####
+
+tests=( $DIR/filtering/test_invalid_filter
+ $DIR/filtering/test_unsupported_op
+ $DIR/filtering/test_valid_filter
+ $DIR/health/test_thread_exit
+ $DIR/health/test_thread_stall
+ $DIR/health/test_tp_fail
+ $DIR/streaming/test_kernel
+ $DIR/streaming/test_ust
+ $DIR/streaming/test_uri_switch
+ $DIR/streaming/test_high_throughput_limits )
+
+#### END TESTS HERE ####
+
+opts=("$@")
+run_tests tests[@] opts[@]
+++ /dev/null
-#!/bin/bash
-
-DIR=$(dirname $0)
-
-tests=( $DIR/streaming/runall $DIR/health/runall $DIR/filtering/runall )
-
-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
gen_ust_events_LDADD = -llttng-ust
endif
-noinst_SCRIPTS = runall test_ust test_kernel test_uri_switch test_high_throughput_limits
-EXTRA_DIST = runall test_ust test_kernel test_uri_switch test_high_throughput_limits
+noinst_SCRIPTS = test_ust test_kernel test_uri_switch test_high_throughput_limits
+EXTRA_DIST = test_ust test_kernel test_uri_switch test_high_throughput_limits
+++ /dev/null
-#!/bin/bash
-
-DIR=$(dirname $0)
-
-tests=( $DIR/test_uri_switch $DIR/test_kernel $DIR/test_ust )
-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