X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fstreaming%2Ftest_ust;h=95c833dfff1bfe9aa1ccde81ddd60656eb00e602;hp=6e6e5a752e2ecb8288c2e22506c629d69d0178ac;hb=d346ccad757068a5df142710ab5895f6ee93082b;hpb=33c820d6c1f3b742a0028e0219b21e364baade78 diff --git a/tests/regression/tools/streaming/test_ust b/tests/regression/tools/streaming/test_ust index 6e6e5a752..95c833dff 100755 --- a/tests/regression/tools/streaming/test_ust +++ b/tests/regression/tools/streaming/test_ust @@ -25,36 +25,37 @@ PID_RELAYD=0 TRACE_PATH=$(mktemp -d) +NUM_TESTS=20 + source $TESTDIR/utils/utils.sh print_test_banner "$TEST_DESC" if [ ! -x "$CURDIR/$BIN_NAME" ]; then - echo -e "No UST nevents binary detected. Passing." - exit 0 + BAIL_OUT "No UST nevents binary detected." fi function lttng_create_session_uri { # Create session with default path $TESTDIR/../src/bin/lttng/$LTTNG_BIN create $SESSION_NAME -U net://localhost >/dev/null 2>&1 + ok $? "Create session with default path" } function wait_apps { - echo -n "Waiting for applications to end" + while [ -n "$(pidof $BIN_NAME)" ]; do - echo -n "." sleep 0.5 done - echo "" + pass "Wait for applications to end" } # MUST set TESTDIR before calling those functions function test_ust_before_start () { - echo -e "\n=== Testing UST streaming BEFORE tracing starts\n" + diag "Test UST streaming BEFORE tracing starts" lttng_create_session_uri enable_ust_lttng_event $SESSION_NAME $EVENT_NAME @@ -64,13 +65,14 @@ function test_ust_before_start () start_lttng_tracing $SESSION_NAME wait_apps + stop_lttng_tracing $SESSION_NAME destroy_lttng_session $SESSION_NAME } function test_ust_after_start () { - echo -e "\n=== Testing UST streaming AFTER tracing starts\n" + diag "Test UST streaming AFTER tracing starts" lttng_create_session_uri enable_ust_lttng_event $SESSION_NAME $EVENT_NAME start_lttng_tracing $SESSION_NAME @@ -79,10 +81,13 @@ function test_ust_after_start () ./$CURDIR/$BIN_NAME 5 1000000 >/dev/null 2>&1 & wait_apps + stop_lttng_tracing $SESSION_NAME destroy_lttng_session $SESSION_NAME } +plan_tests $NUM_TESTS + start_lttng_sessiond start_lttng_relayd "-o $TRACE_PATH" @@ -103,7 +108,6 @@ do fi done -echo "" stop_lttng_sessiond stop_lttng_relayd