Show error if kernel tracer version don't match
[lttng-tools.git] / tests / lttng / run-kernel-tests.sh
CommitLineData
8e0dbb65
DG
1#!/bin/bash
2
32258573 3SESSIOND_BIN="lttng-sessiond"
d3e8f6bb
DG
4TESTDIR=$(dirname $0)/..
5
6source $TESTDIR/utils.sh
8e0dbb65
DG
7
8tmpdir=`mktemp -d`
9tests=( kernel_event_basic kernel_all_events_basic )
10exit_code=0
11
12function start_tests ()
13{
14 for bin in ${tests[@]};
15 do
16 ./$bin $tmpdir
17 # Test must return 0 to pass.
18 if [ $? -ne 0 ]; then
19 exit_code=1
20 break
21 fi
8e0dbb65 22 done
d3e8f6bb
DG
23
24 # Cleaning up
25 rm -rf $tmpdir
8e0dbb65
DG
26}
27
28function check_lttng_modules ()
29{
30 local out=`modprobe -l | grep lttng`
31 if [ -z "$out" ]; then
32 echo "LTTng modules not detected. Aborting kernel tests!"
33 echo ""
34 # Exit status 0 so the tests can continue
35 exit 0
36 fi
37}
38
39echo -e "\n--------------------------------------------------"
40echo -e "Kernel tracer - Testing lttng client (liblttngctl)"
41echo -e "--------------------------------------------------"
42
43# Detect lttng-modules installed
44
45check_lttng_modules
46
8e0dbb65
DG
47# Simply wait for the session daemon bootstrap
48sleep 1
49
50start_tests
51
8e0dbb65 52exit $exit_code
This page took 0.026327 seconds and 4 git commands to generate.