Tests: whitespace fix in src.ctf.lttng-live/test_live
[babeltrace.git] / tests / plugins / src.ctf.lttng-live / test_live
index 891ce45ae858a7878d8e679043b040dc2317fb83..58a58514414daa6f6a0dfc81ffc5ed87ec54d8d4 100755 (executable)
@@ -1,20 +1,9 @@
 #!/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.
@@ -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)"
This page took 0.026004 seconds and 4 git commands to generate.