Tests: Cleanup redundant code and use printing helper functions
[lttng-tools.git] / tests / tools / streaming / uri_switch
index d6fc9385b69642d8a09abd2245df635d1d63110f..cb0979e9a5a347cd0be7268d93c4460e9e2b2f47 100755 (executable)
@@ -15,6 +15,7 @@
 # You should have received a copy of the GNU Lesser General Public License
 # along with this library; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+TEST_DESC="Streaming - URI switching"
 
 CURDIR=$(dirname $0)/
 TESTDIR=$CURDIR/../..
@@ -27,10 +28,7 @@ TRACE_PATH=$(mktemp -d)
 
 source $TESTDIR/utils.sh
 
-echo -e "\n"
-echo -e "---------------------------"
-echo -e " Streaming - URI switching "
-echo -e "---------------------------"
+print_test_banner "$TEST_DESC"
 
 if [ ! -x "$CURDIR/$BIN_NAME" ]; then
        echo -e "No UST nevents binary detected. Skipping."
@@ -106,8 +104,6 @@ function test_uri_switch_localhost_folder
        if [ $? -eq 0 ]; then
        # Only delete if successful
            rm -rf $TRACE_PATH
-       else
-           break
        fi
 }
 
@@ -191,10 +187,10 @@ IPVER=$1
            validate_trace $EVENT_NAME $TMP_PATH/$FILE_PATH
 
            if [ $? -eq 0 ]; then
-               # Only delete if successful
-               rm -rf $TMP_PATH
+                       # Only delete if successful
+                       rm -rf $TMP_PATH
            else
-               break
+                       break
            fi
        done
 }
This page took 0.02359 seconds and 4 git commands to generate.