Callbacks on receive and update FD
[lttng-tools.git] / tests / lttng / runall.sh
CommitLineData
e3fa263d
DG
1#!/bin/bash
2
3SESSIOND_BIN="ltt-sessiond"
4
5tmpdir=`mktemp -d`
c60ddab6 6tests=( kernel_event_basic kernel_all_events_basic )
e3fa263d
DG
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
c60ddab6
DG
19 # Cleaning up
20 rm -rf $tmpdir
e3fa263d
DG
21 done
22}
23
24echo -e "\n----------------------------------"
25echo -e "Testing lttng client (liblttngctl)"
26echo -e "----------------------------------"
27
28if [ -z $(pidof $SESSIOND_BIN) ]; then
29 echo -n "Starting session daemon... "
30 ../ltt-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
e3fa263d 55exit $exit_code
This page took 0.033924 seconds and 4 git commands to generate.