48ccf79ebb0fd9b4371d17d29211ef44534ae1c5
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 SUCCESS_TRACES
=(${BT_CTF_TRACES}/succeed
/*)
22 # -2 because there is an empty trace that we skip
23 NUM_TESTS
=$
((${#SUCCESS_TRACES[@]} * 3 - 2))
27 for path
in "${SUCCESS_TRACES[@]}"; do
28 out_path
="$(mktemp -d)"
29 text_output1
="$(mktemp)"
30 text_output2
="$(mktemp)"
31 trace
="$(basename "${path}")"
33 "${BT_BIN}" "${path}" 2>/dev/null >"${text_output1}"
35 cnt
="$(wc -l < "${text_output1}")"
36 if test "$ret" == 0 && test "$cnt" == 0; then
37 pass
"Empty trace, nothing to copy"
41 "${BT_BIN}" "${path}" --component sink.ctf.fs --path "${out_path}" >/dev
/null
2>&1
42 ok $?
"Copy trace ${trace} with ctf-fs sink"
44 "${BT_BIN}" "${out_path}" >/dev
/null
2>&1
46 fail
"Read the new trace in ${out_path}"
49 pass
"Read the new trace in ${out_path}"
51 "${BT_BIN}" "${out_path}" 2>/dev/null >"${text_output2}"
52 cnt
=$
(diff "${text_output1}" "${text_output2}" |
wc -l)
54 ok $?
"Exact same content between the two traces"
56 rm -rf "${out_path}" "${text_output1}" "${text_output2}"
This page took 0.031348 seconds and 3 git commands to generate.