Move to kernel style SPDX license identifiers
[babeltrace.git] / tests / plugins / flt.lttng-utils.debug-info / test_succeed
index 5338420cc12cd6c7434e6a603befe8c321c7460c..3825b8987fda5e71007a07f8bfa80910f18c8928 100755 (executable)
@@ -1,21 +1,10 @@
 #!/bin/bash
 #
+# SPDX-License-Identifier: GPL-2.0-only
+#
 # Copyright (C) 2019 Philippe Proulx <pproulx@efficios.com>
 # Copyright (C) 2019 Francis Deslauriers <francis.deslauriers@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.
-#
-# 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.
-#
-# 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.
@@ -31,14 +20,14 @@ else
        UTILSSH="$(dirname "$0")/../../utils/utils.sh"
 fi
 
-# shellcheck source=../../../utils/utils.sh
+# shellcheck source=../../utils/utils.sh
 source "$UTILSSH"
 
 this_dir_relative="plugins/flt.lttng-utils.debug-info"
-this_dir_build="$BT_TESTS_BUILDDIR/$this_dir_relative"
 succeed_trace_dir="$BT_CTF_TRACES_PATH/succeed"
 expect_dir="$BT_TESTS_DATADIR/$this_dir_relative"
 binary_artefact_dir="$BT_TESTS_DATADIR/$this_dir_relative"
+data_dir="$BT_TESTS_DATADIR/$this_dir_relative"
 
 test_debug_info() {
        local name="$1"
@@ -66,12 +55,17 @@ test_compare_to_ctf_fs() {
                "-c" "sink.text.details"
                "--params" "with-trace-name=false,with-stream-name=false,with-uuid=false"
        )
-       local actual_stdout=$(mktemp -t test_debug_info_stdout_actual.XXXXXX)
-       local actual_stderr=$(mktemp -t test_debug_info_stderr_actual.XXXXXX)
-       local expected_stdout=$(mktemp -t test_debug_info_stdout_expected.XXXXXX)
-       local expected_stderr=$(mktemp -t test_debug_info_stderr_expected.XXXXXX)
+       local actual_stdout
+       local actual_stderr
+       local expected_stdout
+       local expected_stderr
        local ret=0
 
+       actual_stdout=$(mktemp -t test_debug_info_stdout_actual.XXXXXX)
+       actual_stderr=$(mktemp -t test_debug_info_stderr_actual.XXXXXX)
+       expected_stdout=$(mktemp -t test_debug_info_stdout_expected.XXXXXX)
+       expected_stderr=$(mktemp -t test_debug_info_stderr_expected.XXXXXX)
+
        # Create expected files using a graph without a `debug-info` component.
        bt_cli "$expected_stdout" "$expected_stderr" "${cli_args[@]}" \
                "${details_cli_args[@]}"
@@ -101,10 +95,19 @@ test_compare_ctf_src_trace() {
        test_compare_to_ctf_fs "src.ctf.fs with $trace_name trace" "${cli_args[@]}"
 }
 
-plan_tests 7
+test_compare_complete_src_trace() {
+
+       local source_name="src.test_debug_info.CompleteSrc"
+       local cli_args=("--plugin-path=$data_dir" "-c" "$source_name")
+       test_compare_to_ctf_fs "$source_name" "${cli_args[@]}"
+}
+
+plan_tests 9
 
 test_debug_info debug-info
 
 test_compare_ctf_src_trace smalltrace
 test_compare_ctf_src_trace 2packets
 test_compare_ctf_src_trace session-rotation
+
+test_compare_complete_src_trace
This page took 0.025281 seconds and 4 git commands to generate.