Add basic kernel tracing tests
[lttng-tools.git] / tests / lttng / runall.sh
CommitLineData
e3fa263d
DG
1#!/bin/bash
2
3SESSIOND_BIN="ltt-sessiond"
4
5tmpdir=`mktemp -d`
6tests=( kernel_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 done
20}
21
22echo -e "\n----------------------------------"
23echo -e "Testing lttng client (liblttngctl)"
24echo -e "----------------------------------"
25
26if [ -z $(pidof $SESSIOND_BIN) ]; then
27 echo -n "Starting session daemon... "
28 ../ltt-sessiond/$SESSIOND_BIN --daemonize --quiet
29 if [ $? -eq 1 ]; then
30 echo -e '\e[1;31mFAILED\e[0m'
31 rm -rf $tmpdir
32 exit 1
33 else
34 echo -e "\e[1;32mOK\e[0m"
35 fi
36fi
37
38PID_SESSIOND=`pidof lt-$SESSIOND_BIN`
39
40# Simply wait for the session daemon bootstrap
41sleep 1
42
43start_tests
44
45echo -e -n "\nKilling session daemon... "
46kill $PID_SESSIOND >/dev/null 2>&1
47if [ $? -eq 1 ]; then
48 echo -e '\e[1;31mFAILED\e[0m'
49else
50 echo -e "\e[1;32mOK\e[0m"
51fi
52
53rm -rf $tmpdir
54
55exit $exit_code
This page took 0.033839 seconds and 4 git commands to generate.