Add two basic tests for UST global domain
[lttng-tools.git] / tests / lttng / run-ust-global-tests.sh
CommitLineData
69c0b621
DG
1#!/bin/bash
2
3SESSIOND_BIN="lttng-sessiond"
4
5tmpdir=`mktemp -d`
6tests=( ust_global_event_basic ust_global_all_events_basic )
7exit_code=0
8
9function start_tests ()
10{
11 for bin in ${tests[@]};
12 do
13 ./$bin $tmpdir
14 # Test must return 0 to pass.
15 if [ $? -ne 0 ]; then
16 exit_code=1
17 break
18 fi
19 # Cleaning up
20 rm -rf $tmpdir
21 done
22}
23
24echo -e "\n-------------------------------------------"
25echo -e "UST tracer - GLOBAL DOMAIN (LTTNG_DOMAIN_UST)"
26echo -e "---------------------------------------------"
27
28if [ -z $(pidof $SESSIOND_BIN) ]; then
29 echo -n "Starting session daemon... "
30 ../lttng-sessiond/$SESSIOND_BIN --daemonize --quiet
31 if [ $? -eq 1 ]; then
32 echo -e '\e[1;31mFAILED\e[0m'
33 rm -rf $tmpdir
34 exit 1
35 else
36 echo -e "\e[1;32mOK\e[0m"
37 fi
38fi
39
40PID_SESSIOND=`pidof lt-$SESSIOND_BIN`
41
42# Simply wait for the session daemon bootstrap
43sleep 1
44
45start_tests
46
47echo -e -n "\nKilling session daemon... "
48kill $PID_SESSIOND >/dev/null 2>&1
49if [ $? -eq 1 ]; then
50 echo -e '\e[1;31mFAILED\e[0m'
51else
52 echo -e "\e[1;32mOK\e[0m"
53fi
54
55exit $exit_code
This page took 0.032918 seconds and 4 git commands to generate.