Fix: use start and stop sessiond from utils.sh
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 17 Sep 2015 20:42:35 +0000 (16:42 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Oct 2015 16:30:25 +0000 (12:30 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/ust/daemon/test_daemon
tests/regression/ust/exit-fast/test_exit-fast
tests/regression/ust/fork/test_fork
tests/regression/ust/libc-wrapper/test_libc-wrapper
tests/regression/ust/linking/test_linking

index 54afd0cdc55625e0207e2241928d423f34f17414..13dda1b8a74b678af288aad89536b65a3f5b2e7d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # Copyright (C) - 2013 Jérémie Galarneau <jeremie.galarneau@efficios.com>
 #
 # this program; if not, write to the Free Software Foundation, Inc., 51
 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-# Check for a running sessiond
-`pidof lt-lttng-sessiond`
-STOP_SESSIOND=$?
-
 CURDIR=$(dirname $0)
 TESTDIR=${CURDIR}/../../..
 
-# Try to launch a sessiond before invoking the python test script
-if [ $STOP_SESSIOND -ne 0 ]; then
-       DIR=$(readlink -f ${TESTDIR})
-       ${DIR}/../src/bin/lttng-sessiond/lttng-sessiond --daemonize --quiet --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd"
-fi
+source $TESTDIR/utils/utils.sh
+
+start_lttng_sessiond_notap
 
 python3 ${CURDIR}/test_daemon.py
 
-if [ $STOP_SESSIOND -ne 0 ]; then
-    kill `pidof lt-lttng-sessiond`
-fi
+stop_lttng_sessiond_notap
index e8a0bd637dbc90005554d4aaf345b4407f11e466..4b7217116f20a71e917fc5ad5855c36de225eccc 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # Copyright (C) - 2013 Jérémie Galarneau <jeremie.galarneau@efficios.com>
 #
 # this program; if not, write to the Free Software Foundation, Inc., 51
 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-# Check for a running sessiond
-`pidof lt-lttng-sessiond`
-STOP_SESSIOND=$?
-
 CURDIR=$(dirname $0)
 TESTDIR=${CURDIR}/../../..
 
-# Try to launch a sessiond before invoking the python test script
-if [ $STOP_SESSIOND -ne 0 ]; then
-       DIR=$(readlink -f ${TESTDIR})
-       ${DIR}/../src/bin/lttng-sessiond/lttng-sessiond --daemonize --quiet --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd"
-fi
+source $TESTDIR/utils/utils.sh
+
+start_lttng_sessiond_notap
 
 python3 ${CURDIR}/test_exit-fast.py
 
-if [ $STOP_SESSIOND -ne 0 ]; then
-    kill `pidof lt-lttng-sessiond`
-fi
+stop_lttng_sessiond_notap
index e05b5560dc85a7f0409e4533c4e4f6774606ce56..3d0fb898f2d3b1d762ec3eefffac5469f6a92ce8 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # Copyright (C) - 2013 Jérémie Galarneau <jeremie.galarneau@efficios.com>
 #
 # this program; if not, write to the Free Software Foundation, Inc., 51
 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-# Check for a running sessiond
-`pidof lt-lttng-sessiond`
-STOP_SESSIOND=$?
-
 CURDIR=$(dirname $0)
 TESTDIR=${CURDIR}/../../..
 
-# Try to launch a sessiond before invoking the python test script
-if [ $STOP_SESSIOND -ne 0 ]; then
-       DIR=$(readlink -f ${TESTDIR})
-       ${DIR}/../src/bin/lttng-sessiond/lttng-sessiond --daemonize --quiet --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd"
-fi
+source $TESTDIR/utils/utils.sh
+
+start_lttng_sessiond_notap
 
 python3 ${CURDIR}/test_fork.py
 
-if [ $STOP_SESSIOND -ne 0 ]; then
-    kill `pidof lt-lttng-sessiond`
-fi
+stop_lttng_sessiond_notap
index 8c6b1282689a1bdf4ca296d875df498eec248765..14d227f29b915561c6a99c26b4070b75e8f377fd 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # Copyright (C) - 2013 Jérémie Galarneau <jeremie.galarneau@efficios.com>
 #
 # this program; if not, write to the Free Software Foundation, Inc., 51
 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-# Check for a running sessiond
-`pidof lt-lttng-sessiond`
-STOP_SESSIOND=$?
-
 CURDIR=$(dirname $0)
 TESTDIR=${CURDIR}/../../..
 
-# Try to launch a sessiond before invoking the python test script
-if [ $STOP_SESSIOND -ne 0 ]; then
-       DIR=$(readlink -f ${TESTDIR})
-       ${DIR}/../src/bin/lttng-sessiond/lttng-sessiond --daemonize --quiet --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd"
-fi
+source $TESTDIR/utils/utils.sh
+
+start_lttng_sessiond_notap
 
 python3 ${CURDIR}/test_libc-wrapper.py
 
-if [ $STOP_SESSIOND -ne 0 ]; then
-    kill `pidof lt-lttng-sessiond`
-fi
+stop_lttng_sessiond_notap
index 77e0b82f2493a6c0ee0f404e557f91f69b6d55a4..e630b099357b193e1dcbe755ea2b1e60dc33aa9e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # Copyright (C) - 2013 Jérémie Galarneau <jeremie.galarneau@efficios.com>
 #
 # 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., 51
 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# Check for a running sessiond
-`pidof lt-lttng-sessiond`
-STOP_SESSIOND=$?
-
 CURDIR=$(dirname $0)
 TESTDIR=${CURDIR}/../../..
 
+source $TESTDIR/utils/utils.sh
+
 # Try to launch a sessiond before invoking the python test script
-if [ $STOP_SESSIOND -ne 0 ]; then
-       DIR=$(readlink -f ${TESTDIR})
-       ${DIR}/../src/bin/lttng-sessiond/lttng-sessiond --daemonize --quiet --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd"
-fi
+start_lttng_sessiond_notap
 
 python3 ${CURDIR}/test_linking.py
 
-if [ $STOP_SESSIOND -ne 0 ]; then
-    kill `pidof lt-lttng-sessiond`
-fi
+stop_lttng_sessiond_notap
This page took 0.029257 seconds and 5 git commands to generate.