# 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/../..
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."
# 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
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
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