3 # Copyright (C) EfficiOS Inc.
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
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.
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.
19 # This test verifies that generic (non-LTTng) CTF traces are output with the
20 # expected directory structure.
22 # Traces found when invoking
24 # babeltrace2 in -c sink.ctf.fs -p 'path="out"'
26 # are expected to use the same directory structure relative to `out` as the
27 # original traces had relative to `in`.
31 if [ "x${BT_TESTS_SRCDIR:-}" != "x" ]; then
32 UTILSSH
="$BT_TESTS_SRCDIR/utils/utils.sh"
34 UTILSSH
="$(dirname "$0")/../utils/utils.sh"
37 # shellcheck source=../utils/utils.sh
42 temp_input_dir
=$
(mktemp
-d)
43 temp_output_dir
=$
(mktemp
-d)
45 mkdir
-p "${temp_input_dir}/a/b/c"
46 cp -a "${BT_CTF_TRACES_PATH}/intersection/3eventsintersect" "${temp_input_dir}/a/b/c"
48 mkdir
-p "${temp_input_dir}/a/b/c"
49 cp -a "${BT_CTF_TRACES_PATH}/intersection/3eventsintersectreverse" "${temp_input_dir}/a/b/c"
51 mkdir
-p "${temp_input_dir}/d/e/f"
52 cp -a "${BT_CTF_TRACES_PATH}/intersection/nointersect" "${temp_input_dir}/d/e/f"
54 "${BT_TESTS_BT2_BIN}" "${temp_input_dir}" -c sink.ctf.fs -p "path=\"${temp_output_dir}\""
56 test -f "${temp_output_dir}/a/b/c/3eventsintersect/metadata"
57 ok
"$?" "3eventsintersect output trace exists"
59 test -f "${temp_output_dir}/a/b/c/3eventsintersectreverse/metadata"
60 ok
"$?" "3eventsintersectreverse output trace exists"
62 test -f "${temp_output_dir}/d/e/f/nointersect/metadata"
63 ok
"$?" "nointersect output trace exists"
65 rm -rf "${temp_input_dir}" "${temp_output_dir}"
This page took 0.031785 seconds and 4 git commands to generate.