3 # Copyright (C) - 2017 Julien Desfossez <jdesfossez@efficios.com>
5 # This program is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License, version 2 only, as
7 # published by the Free Software Foundation.
9 # This program is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 # You should have received a copy of the GNU General Public License along with
15 # this program; if not, write to the Free Software Foundation, Inc., 51
16 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 .
"@abs_top_srcdir@/tests/utils/common.sh"
20 TRACE_PATH
="${BT_CTF_TRACES}/succeed/wk-heartbeat-u/"
28 "${BT_BIN}" --clock-gmt --begin 17:48:17.587029529 --end 17:48:17.588680018 \
29 "${TRACE_PATH}" >/dev
/null
2>&1
30 ok $?
"Read the trace with the trimmer enabled"
32 "${BT_BIN}" --clock-gmt --begin 17:48:17.587029529 "${TRACE_PATH}" \
33 2>/dev
/null
>"${tmp_out}"
34 ok $?
"Running with --begin"
35 cnt
=$
(wc -l < "${tmp_out}")
37 ok $?
"Expected number of events after trimming begin and end"
39 "${BT_BIN}" --clock-gmt --end 17:48:17.588680018 "${TRACE_PATH}" \
40 2>/dev
/null
>"${tmp_out}"
41 ok $?
"Running with --end"
42 cnt
=$
(wc -l < "${tmp_out}")
44 ok $?
"Expected number of events after trimming end"
46 "${BT_BIN}" --clock-gmt --begin 17:48:17.587029529 --end 17:48:17.588680018 \
47 "${TRACE_PATH}" 2>/dev
/null
>"${tmp_out}"
48 ok $?
"Running with --begin and --end"
49 cnt
=$
(wc -l < "${tmp_out}")
51 ok $?
"Expected number of events after trimming begin and end"
53 "${BT_BIN}" --clock-gmt --begin 18:48:17.587029529 "${TRACE_PATH}" \
54 2>/dev
/null
>"${tmp_out}"
55 ok $?
"Running with --begin out of range"
56 cnt
=$
(wc -l < "${tmp_out}")
58 ok $?
"No event output when begin is after the end of the trace"
60 "${BT_BIN}" --clock-gmt --end 16:48:17.588680018 "${TRACE_PATH}" \
61 2>/dev
/null
>"${tmp_out}"
62 cnt
=$
(wc -l < "${tmp_out}")
64 ok $?
"No event output when end is before the beginning of the trace"
This page took 0.046196 seconds and 5 git commands to generate.