Fix tests when lttng-ust is disabled
[lttng-tools.git] / tests / ust / nevents / ust-nevents
CommitLineData
d3e8f6bb
DG
1#!/bin/bash
2#
3# Copyright (C) - 2012 David Goulet <dgoulet@efficios.com>
4#
5# This library is free software; you can redistribute it and/or modify it under
6# the terms of the GNU Lesser General Public License as published by the Free
7# Software Foundation; version 2.1 of the License.
8#
9# This library is distributed in the hope that it will be useful, but WITHOUT
10# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12# details.
13#
14# You should have received a copy of the GNU Lesser General Public License
15# along with this library; if not, write to the Free Software Foundation, Inc.,
16# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
ec8f26de 18CURDIR=$(dirname $0)/
355f483d
DG
19TESTDIR=$CURDIR/../..
20NR_ITER=$1
d3e8f6bb
DG
21SESSION_NAME="ust-nevents"
22EVENT_NAME="ust_gen_nevents:tptest"
d3e8f6bb
DG
23
24source $TESTDIR/utils.sh
25
ec8f26de
DG
26TRACE_PATH=$(mktemp -d)
27
d3e8f6bb
DG
28# MUST set TESTDIR before calling those functions
29
30create_lttng_session $SESSION_NAME $TRACE_PATH
31
32enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
33start_tracing $SESSION_NAME
34
35# Start test
ec8f26de 36./$CURDIR/gen-nevents $NR_ITER
d3e8f6bb
DG
37
38stop_tracing $SESSION_NAME
39destroy_lttng_session $SESSION_NAME
40
41trace_matches $EVENT_NAME $NR_ITER $TRACE_PATH
42
43rm -rf $TRACE_PATH
This page took 0.024254 seconds and 4 git commands to generate.