X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Fplugins%2Fsrc.ctf.lttng-live%2Ftest_live;h=58a58514414daa6f6a0dfc81ffc5ed87ec54d8d4;hb=4079467b0a1f4bf9a6eeba10cd4408ec9f1c72e6;hp=891ce45ae858a7878d8e679043b040dc2317fb83;hpb=90a8a0f23a364a3e1e3b7702c57b9c22473500a3;p=babeltrace.git diff --git a/tests/plugins/src.ctf.lttng-live/test_live b/tests/plugins/src.ctf.lttng-live/test_live index 891ce45a..58a58514 100755 --- a/tests/plugins/src.ctf.lttng-live/test_live +++ b/tests/plugins/src.ctf.lttng-live/test_live @@ -1,20 +1,9 @@ #!/bin/bash # -# Copyright (C) 2019 Philippe Proulx -# -# 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 # -# 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. @@ -139,8 +128,10 @@ get_cli_output_with_lttng_live_server() { 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 @@ -186,7 +177,7 @@ run_test() { 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)"