X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fust%2Fbefore-after%2Frun;h=5f6cc439b862cfb2b347db09f2e83209606a9264;hp=9b165282171a7bbb92fab9888a673170d6ff8873;hb=c38b5107fcb9435ea7584e82f6c61319a9391fc0;hpb=fec81a7e6e7d21bef1a16643404ac5016009feb3 diff --git a/tests/ust/before-after/run b/tests/ust/before-after/run index 9b1652821..5f6cc439b 100755 --- a/tests/ust/before-after/run +++ b/tests/ust/before-after/run @@ -14,6 +14,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="UST tracer - Start tracing before and after execution" CURDIR=$(dirname $0)/ TESTDIR=$CURDIR/../.. @@ -23,9 +24,7 @@ EVENT_NAME="ust_gen_nevents:tptest" source $TESTDIR/utils.sh -echo -e "\n----------------------------------------------------" -echo -e "UST tracer - Star tracing before and after execution" -echo -e "----------------------------------------------------" +print_test_banner "$TEST_DESC" if [ ! -x "$CURDIR/gen-nevents" ]; then echo -e "No UST nevents binary detected. Passing." @@ -44,7 +43,8 @@ test_before_apps() { # Start test echo -n "Starting application... " ./$CURDIR/gen-nevents $NR_ITER - echo -e "Ended \e[1;32mOK\e[0m" + echo -n "Ended " + print_ok stop_tracing $SESSION_NAME destroy_lttng_session $SESSION_NAME @@ -58,7 +58,7 @@ test_after_apps() { echo -n "Starting application... " ./$CURDIR/gen-nevents 100 & - echo -e "\e[1;32mOK\e[0m" + print_ok # BEFORE application is spawned create_lttng_session $SESSION_NAME $TRACE_PATH @@ -74,11 +74,11 @@ test_after_apps() { out=$(babeltrace $TRACE_PATH | grep $EVENT_NAME | wc -l) if [ $out -eq 0 ]; then echo -n "No event found. Suppose to have at least one... " - echo -e "\e[1;31mFAILED\e[0m" + print_fail out=1 else echo -n "Found $out event(s). Coherent... " - echo -e "\e[1;32mOK\e[0m" + print_ok out=0 fi