Commit | Line | Data |
---|---|---|
69c0b621 DG |
1 | #!/bin/bash |
2 | ||
3 | SESSIOND_BIN="lttng-sessiond" | |
d3e8f6bb DG |
4 | TESTDIR=$(dirname $0)/.. |
5 | ||
6 | source $TESTDIR/utils.sh | |
69c0b621 DG |
7 | |
8 | tmpdir=`mktemp -d` | |
9 | tests=( ust_global_event_basic ust_global_all_events_basic ) | |
10 | exit_code=0 | |
11 | ||
12 | function start_tests () | |
13 | { | |
14 | for bin in ${tests[@]}; | |
15 | do | |
ec8f26de DG |
16 | if [ ! -e $bin ]; then |
17 | echo -e "$bin not found, passing" | |
18 | continue | |
19 | fi | |
20 | ||
69c0b621 DG |
21 | ./$bin $tmpdir |
22 | # Test must return 0 to pass. | |
23 | if [ $? -ne 0 ]; then | |
24 | exit_code=1 | |
25 | break | |
26 | fi | |
69c0b621 | 27 | done |
d3e8f6bb DG |
28 | |
29 | # Cleaning up | |
30 | rm -rf $tmpdir | |
69c0b621 DG |
31 | } |
32 | ||
33 | echo -e "\n-------------------------------------------" | |
d3e8f6bb | 34 | echo -e "UST tracer - Global domain (LTTNG_DOMAIN_UST)" |
69c0b621 DG |
35 | echo -e "---------------------------------------------" |
36 | ||
69c0b621 DG |
37 | PID_SESSIOND=`pidof lt-$SESSIOND_BIN` |
38 | ||
39 | # Simply wait for the session daemon bootstrap | |
40 | sleep 1 | |
41 | ||
42 | start_tests | |
43 | ||
69c0b621 | 44 | exit $exit_code |