From: Jonathan Rajotte Date: Wed, 28 Mar 2018 19:47:31 +0000 (-0400) Subject: Tests: Reduce scope of TRACE_PATH to a function X-Git-Tag: v2.11.0-rc1~291 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=2f686e352cba0ab437e2f1abaf8eed6295547fba;p=lttng-tools.git Tests: Reduce scope of TRACE_PATH to a function Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/tools/rotation/test_save_load_mi b/tests/regression/tools/rotation/test_save_load_mi index 862634db5..e8971bb6d 100755 --- a/tests/regression/tools/rotation/test_save_load_mi +++ b/tests/regression/tools/rotation/test_save_load_mi @@ -21,14 +21,12 @@ CURDIR=$(dirname $0)/ TESTDIR=$CURDIR/../../.. SESSION_NAME="stream" -TRACE_PATH=$(mktemp -d) - NUM_TESTS=22 source $TESTDIR/utils/utils.sh source $CURDIR/rotate_utils.sh -#Overwrite the lttng_bin to get mi output +# Overwrite the lttng_bin to get mi output LTTNG_BIN="lttng --mi xml" XSD_PATH=$TESTDIR/../src/common/mi-lttng-3.0.xsd @@ -44,9 +42,10 @@ function test_save_load_mi () { tmp_xml_output=$(mktemp -u) tmp_save_output=$(mktemp -d) + trace_path=$(mktemp -d) diag "Test save/load/list/MI with rotation" - create_lttng_session_ok $SESSION_NAME $TRACE_PATH + create_lttng_session_ok $SESSION_NAME $trace_path enable_ust_lttng_event_ok $SESSION_NAME -a # Enable a rotation timer and check the MI output of the command @@ -105,7 +104,7 @@ function test_save_load_mi () OUTPUT_DEST=/dev/null destroy_lttng_session_ok $SESSION_NAME - rm -rf ${TRACE_PATH} + rm -rf ${trace_path} rm $tmp_xml_output rm -rf $tmp_save_output }