X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Fplugins%2Fflt.lttng-utils.debug-info%2Ftest_succeed;fp=tests%2Fplugins%2Fflt.lttng-utils.debug-info%2Ftest_succeed;h=b57b7a785029a34eb54ae80580d628aa85f49240;hb=d3765576bcdab2fff6360fffc0b77f1021d1a771;hp=0000000000000000000000000000000000000000;hpb=3625612b8d1f68582f54f4113e375fdf5c66fc09;p=babeltrace.git diff --git a/tests/plugins/flt.lttng-utils.debug-info/test_succeed b/tests/plugins/flt.lttng-utils.debug-info/test_succeed new file mode 100755 index 00000000..b57b7a78 --- /dev/null +++ b/tests/plugins/flt.lttng-utils.debug-info/test_succeed @@ -0,0 +1,59 @@ +#!/bin/bash +# +# Copyright (C) 2019 Philippe Proulx +# Copyright (C) 2019 Francis Deslauriers +# +# 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. +# +# Such CTF traces to open either exist (in `tests/ctf-traces/succeed`) +# or are generated by this test using local trace generators. + +SH_TAP=1 + +if [ "x${BT_TESTS_SRCDIR:-}" != "x" ]; then + UTILSSH="$BT_TESTS_SRCDIR/utils/utils.sh" +else + UTILSSH="$(dirname "$0")/../../utils/utils.sh" +fi + +# 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" + +test_debug_info() { + local name="$1" + local local_args=( + "-c" "flt.lttng-utils.debug-info" + "-p" "target-prefix=\"$binary_artefact_dir/x86_64-linux-gnu/dwarf_full\"" + "-c" "sink.text.details" + "-p" "with-trace-name=no,with-stream-name=no" + ) + + bt_diff_cli "$expect_dir/trace-$name.expect" "/dev/null" \ + "$succeed_trace_dir/$name" "${local_args[@]}" + ok $? "Trace '$name' gives the expected output" +} + +plan_tests 1 + +test_debug_info debug-info