#!/bin/bash
#
-# Copyright (C) 2019 Philippe Proulx <pproulx@efficios.com>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; only version 2
-# of the License.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# Copyright (C) 2019 Philippe Proulx <pproulx@efficios.com>
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# This test validates that a `src.ctf.fs` component successfully reads
# specific CTF traces and creates the expected messages.
cli_args=${cli_args_template//@PORT@/$port}
- diag "Running CLI: 'babeltrace2 $cli_args'"
- if ! "$BT_TESTS_BT2_BIN" $cli_args 1>"$cli_stdout_file" 2>"$cli_stderr_file"; then
+ # Split argument string by spaces into an array.
+ IFS=' ' read -ra cli_args <<< "$cli_args"
+
+ if ! bt_cli "$cli_stdout_file" "$cli_stderr_file" "${cli_args[@]}"; then
# CLI failed: cancel everything else
kill_lttng_live_server "$server_pid_file"
wait
local cli_stderr
local cli_stdout
local port_file
- local port
+ local port
cli_stderr="$(mktemp -t test_live_stderr.XXXXXX)"
cli_stdout="$(mktemp -t test_live_stdout.XXXXXX)"