Use LTTNG_TEST_TRACE_FORMAT from env to chose the session trace format
[lttng-tools.git] / tests / utils / utils.sh
index a4698c4afabce57da889f986a6c7b7512c8c3c7a..04f76215e81b5f2be6c5d0ca25b1b14c201cf376 100644 (file)
@@ -33,6 +33,7 @@ system_long_bit_size=$(getconf LONG_BIT)
 KERNEL_MAJOR_VERSION=2
 KERNEL_MINOR_VERSION=6
 KERNEL_PATCHLEVEL_VERSION=27
+TRACE_FORMAT_OUTPUT=${LTTNG_TESTS_TRACE_FORMAT:-ctf1}
 
 # We set the default UST register timeout and network and app socket timeout to
 # "wait forever", so that basic tests don't have to worry about hitting
@@ -1054,7 +1055,7 @@ function create_lttng_session_no_output ()
 {
        local sess_name=$1
        local opts="${@:2}"
-       local trace_format=("--trace-format" "ctf1")
+       local trace_format=("--trace-format" "$TRACE_FORMAT_OUTPUT")
 
        _run_lttng_cmd "$OUTPUT_DEST" "$ERROR_OUTPUT_DEST" \
                create "${trace_format[@]}" $sess_name --no-output $opts
@@ -1065,7 +1066,7 @@ function create_lttng_session_uri () {
        local sess_name=$1
        local uri=$2
        local opts="${@:3}"
-       local trace_format=("--trace-format" "ctf1")
+       local trace_format=("--trace-format" "$TRACE_FORMAT_OUTPUT")
 
        _run_lttng_cmd "$OUTPUT_DEST" "$ERROR_OUTPUT_DEST" \
                create "${trace_format[@]}" $sess_name -U $uri $opts
@@ -1079,7 +1080,7 @@ function create_lttng_session ()
        local sess_name=$3
        local trace_path=$4
        local opt=$5
-       local trace_format=("--trace-format" "ctf1")
+       local trace_format=("--trace-format" "$TRACE_FORMAT_OUTPUT")
 
        if [ -z "$trace_path" ]; then
                # Use lttng-sessiond default output.
This page took 0.024618 seconds and 5 git commands to generate.