X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Flttng%2Frun-ust-global-tests.sh;h=a99ff43b307b3be917f132d81eae62f571ebea82;hp=bfcb974bf22c67566dd6d6ed7d1e712f39e167ba;hb=ec8f26de70d4862d4fad73f844c19fabf30b19c8;hpb=69c0b621c0c998a393da0e7fa093201d8de01e88 diff --git a/tests/lttng/run-ust-global-tests.sh b/tests/lttng/run-ust-global-tests.sh index bfcb974bf..a99ff43b3 100755 --- a/tests/lttng/run-ust-global-tests.sh +++ b/tests/lttng/run-ust-global-tests.sh @@ -1,6 +1,9 @@ #!/bin/bash SESSIOND_BIN="lttng-sessiond" +TESTDIR=$(dirname $0)/.. + +source $TESTDIR/utils.sh tmpdir=`mktemp -d` tests=( ust_global_event_basic ust_global_all_events_basic ) @@ -10,33 +13,27 @@ function start_tests () { for bin in ${tests[@]}; do + if [ ! -e $bin ]; then + echo -e "$bin not found, passing" + continue + fi + ./$bin $tmpdir # Test must return 0 to pass. if [ $? -ne 0 ]; then exit_code=1 break fi - # Cleaning up - rm -rf $tmpdir done + + # Cleaning up + rm -rf $tmpdir } echo -e "\n-------------------------------------------" -echo -e "UST tracer - GLOBAL DOMAIN (LTTNG_DOMAIN_UST)" +echo -e "UST tracer - Global domain (LTTNG_DOMAIN_UST)" echo -e "---------------------------------------------" -if [ -z $(pidof $SESSIOND_BIN) ]; then - echo -n "Starting session daemon... " - ../lttng-sessiond/$SESSIOND_BIN --daemonize --quiet - if [ $? -eq 1 ]; then - echo -e '\e[1;31mFAILED\e[0m' - rm -rf $tmpdir - exit 1 - else - echo -e "\e[1;32mOK\e[0m" - fi -fi - PID_SESSIOND=`pidof lt-$SESSIOND_BIN` # Simply wait for the session daemon bootstrap @@ -44,12 +41,4 @@ sleep 1 start_tests -echo -e -n "\nKilling session daemon... " -kill $PID_SESSIOND >/dev/null 2>&1 -if [ $? -eq 1 ]; then - echo -e '\e[1;31mFAILED\e[0m' -else - echo -e "\e[1;32mOK\e[0m" -fi - exit $exit_code