Freebsd support: check for libc/libdl dlopen
[lttng-tools.git] / tests / runall.sh
CommitLineData
6e0ca3c2
DG
1#!/bin/bash
2#
3# Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
4#
5# This program is free software; you can redistribute it and/or
6# modify it under the terms of the GNU General Public License
63371d1e
DG
7# as published by the Free Software Foundation; only version 2
8# of the License.
6e0ca3c2
DG
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18#
19
6e0ca3c2
DG
20#### ADD TESTS HERE ####
21
fd4dfcec
DG
22# A spawned session daemon is needed for those tests
23test_with_sessiond=( lttng/runall.sh ust-nevents/run ust-nprocesses/run )
24
25# No session daemon needed
26test_no_sessiond=( test_sessions test_kernel_data_trace test_ust_data_trace )
897b8e23
DG
27
28#### END TESTS HERE ####
29
d3e8f6bb
DG
30TESTDIR=$(dirname $0)
31
32source $TESTDIR/utils.sh
33
fd4dfcec
DG
34## NO Session daemon ##
35for bin in ${test_no_sessiond[@]};
36do
37 if [ ! -e $bin ]; then
38 echo -e "$bin not found, passing"
39 continue
40 fi
41
42 ./$bin
43 # Test must return 0 to pass.
44 if [ $? -ne 0 ]; then
45 echo -e '\e[1;31mFAIL\e[0m'
46 echo ""
47 exit 1
48 fi
49done
50
51# With session daemon
d3e8f6bb 52start_sessiond
fd4dfcec
DG
53out=$?
54if [ $out -eq 2 ]; then
55 # Kernel version is not compatible.
56 exit 0
57elif [ $out -ne 0 ]; then
58 echo "NOT bad $?"
d3e8f6bb
DG
59 exit 1
60fi
61
fd4dfcec 62for bin in ${test_with_sessiond[@]};
63371d1e 63do
ec8f26de
DG
64 if [ ! -e $bin ]; then
65 echo -e "$bin not found, passing"
66 continue
67 fi
68
63371d1e 69 ./$bin
897b8e23
DG
70 # Test must return 0 to pass.
71 if [ $? -ne 0 ]; then
72 echo -e '\e[1;31mFAIL\e[0m'
73 echo ""
d3e8f6bb 74 stop_sessiond
897b8e23
DG
75 exit 1
76 fi
63371d1e 77done
6e0ca3c2 78
63371d1e 79echo ""
d3e8f6bb 80stop_sessiond
6e0ca3c2 81exit 0
This page took 0.027466 seconds and 4 git commands to generate.