From: Christian Babeux Date: Fri, 22 Feb 2013 03:57:15 +0000 (-0500) Subject: Tests: Add runner script for UST regression tests X-Git-Tag: v2.2.0-rc1~60^2~7 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3a23faced5c34db33dbcdd5c851c12a534e89d85;p=lttng-tools.git Tests: Add runner script for UST regression tests Also remove the old runners scripts. Signed-off-by: Christian Babeux --- diff --git a/tests/regression/ust/run-ust-global-tests.sh b/tests/regression/ust/run-ust-global-tests.sh deleted file mode 100755 index c09f70c26..000000000 --- a/tests/regression/ust/run-ust-global-tests.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -SESSIOND_BIN="lttng-sessiond" -CURDIR=$(dirname $0) -TESTDIR=$CURDIR/../.. - -source $TESTDIR/utils/utils.sh - -tmpdir=`mktemp -d` -tests=( $CURDIR/ust_global_event_basic $CURDIR/ust_global_event_wildcard ) -exit_code=0 - -function start_tests () -{ - for bin in ${tests[@]}; - do - if [ ! -e $bin ]; then - echo -e "$bin not found, passing" - continue - fi - - start_lttng_sessiond - - ./$bin $tmpdir - # Test must return 0 to pass. - if [ $? -ne 0 ]; then - exit_code=1 - stop_lttng_sessiond - break - fi - stop_lttng_sessiond - done - - # Cleaning up - rm -rf $tmpdir -} - -TEST_DESC="UST tracer - Global domain (LTTNG_DOMAIN_UST)" - -print_test_banner "$TEST_DESC" - -start_tests - -exit $exit_code diff --git a/tests/regression/ust/run.sh b/tests/regression/ust/run.sh new file mode 100755 index 000000000..79b745c88 --- /dev/null +++ b/tests/regression/ust/run.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Copyright (C) 2013 - Christian Babeux +# +# 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/test_event_basic + $DIR/test_event_wildcard + $DIR/before-after/test_before_after + $DIR/high-throughput/test_high_throughput + $DIR/low-throughput/test_low_throughput + $DIR/multi-session/test_multi_session + $DIR/nprocesses/test_nprocesses + $DIR/overlap/test_overlap ) + +#### END TESTS HERE #### + +opts=("$@") +run_tests tests[@] opts[@] diff --git a/tests/regression/ust/runall.sh b/tests/regression/ust/runall.sh deleted file mode 100755 index 89aa3bb3b..000000000 --- a/tests/regression/ust/runall.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -DIR=$(dirname $0) - -tests=( $DIR/run-ust-global-tests.sh $DIR/nprocesses/test_nprocesses \ - $DIR/high-throughput/test_high_throughput $DIR/before-after/test_before_after \ - $DIR/multi-session/test_multi_session $DIR/overlap/test_overlap ) - -# $DIR/low-throughput/run --> DEACTIVATED. -# Use only for release. This test last 20 minutes - -exit_code=0 - -function start_tests () -{ - for bin in ${tests[@]}; - do - ./$bin - # Test must return 0 to pass. - if [ $? -ne 0 ]; then - exit_code=1 - break - fi - done -} - -start_tests - -exit $exit_code