Freebsd support: check for libc/libdl dlopen
[lttng-tools.git] / tests / runall.sh
... / ...
CommitLineData
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
7# as published by the Free Software Foundation; only version 2
8# of the License.
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
20#### ADD TESTS HERE ####
21
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 )
27
28#### END TESTS HERE ####
29
30TESTDIR=$(dirname $0)
31
32source $TESTDIR/utils.sh
33
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
52start_sessiond
53out=$?
54if [ $out -eq 2 ]; then
55 # Kernel version is not compatible.
56 exit 0
57elif [ $out -ne 0 ]; then
58 echo "NOT bad $?"
59 exit 1
60fi
61
62for bin in ${test_with_sessiond[@]};
63do
64 if [ ! -e $bin ]; then
65 echo -e "$bin not found, passing"
66 continue
67 fi
68
69 ./$bin
70 # Test must return 0 to pass.
71 if [ $? -ne 0 ]; then
72 echo -e '\e[1;31mFAIL\e[0m'
73 echo ""
74 stop_sessiond
75 exit 1
76 fi
77done
78
79echo ""
80stop_sessiond
81exit 0
This page took 0.025347 seconds and 4 git commands to generate.