Mi test: make sure to not auto load session when using lttng-sessiond
authorJonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Mon, 28 Jul 2014 14:56:05 +0000 (10:56 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 28 Jul 2014 15:10:13 +0000 (11:10 -0400)
Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
tests/regression/tools/mi/test_mi
tests/utils/utils.sh

index b70450e331ff0b22019bab679ae45e3b65bb6259..fa46b514ef90d98dfee68b220be3d9afd81eb4c1 100755 (executable)
@@ -32,6 +32,7 @@ NR_USEC_WAIT=10000
 
 #Temp file output
 OUTPUT_DIR=$(mktemp -d)
+FOO_LOAD_DIR=$(mktemp -d)
 OUTPUT_FILE="default.xml"
 
 #Path to custom xml utilities
@@ -683,7 +684,7 @@ function test_snapshot () {
        destroy_lttng_sessions
 }
 
-start_lttng_sessiond
+start_lttng_sessiond $FOO_LOAD_DIR
 TESTS=(
        test_version
        test_create_session
index 3f287d21fe67a124ee3eb3671895cae6e2965946..4b081a48ba365198b68a8873ae5964f0c1fb202c 100644 (file)
@@ -153,8 +153,11 @@ function stop_lttng_relayd
        fi
 }
 
+#First argument: load path for automatic loading
 function start_lttng_sessiond()
 {
+
+       local load_path="$1"
        if [ -n $TEST_NO_SESSIOND ] && [ "$TEST_NO_SESSIOND" == "1" ]; then
                # Env variable requested no session daemon
                return
@@ -171,7 +174,12 @@ function start_lttng_sessiond()
        export LTTNG_SESSION_CONFIG_XSD_PATH
 
        if [ -z $(pidof lt-$SESSIOND_BIN) ]; then
-               $DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --background --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd"
+               # Have a load path ?
+               if [ -n "$1" ]; then
+                       $DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --load "$1" --background --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd"
+               else
+                       $DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --background --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd"
+               fi
                #$DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --verbose-consumer >>/tmp/sessiond.log 2>&1 &
                status=$?
                ok $status "Start session daemon"
This page took 0.035036 seconds and 4 git commands to generate.