X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=tests%2Fplugins%2Fsink.ctf.fs%2Ftest_assume_single_trace;h=69dfb3626c366d4a552d11f71223708b43cef654;hp=6af7aa05cfe83b2e7b4843b1f3f3d7f54c17cbdb;hb=HEAD;hpb=75e396f6b20bdf52c76a3c7312e7fb815ac1e5e9 diff --git a/tests/plugins/sink.ctf.fs/test_assume_single_trace b/tests/plugins/sink.ctf.fs/test_assume_single_trace deleted file mode 100755 index 6af7aa05..00000000 --- a/tests/plugins/sink.ctf.fs/test_assume_single_trace +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -# -# SPDX-License-Identifier: GPL-2.0-only -# -# Copyright (C) 2020 EfficiOS Inc. -# - -# This file tests the assume-single-trace parameter of sink.ctf.fs. - -SH_TAP=1 - -if [ -n "${BT_TESTS_SRCDIR:-}" ]; then - UTILSSH="$BT_TESTS_SRCDIR/utils/utils.sh" -else - UTILSSH="$(dirname "$0")/../../utils/utils.sh" -fi - -# shellcheck source=../../utils/utils.sh -source "$UTILSSH" - -# Directory containing the Python test source. -data_dir="$BT_TESTS_DATADIR/plugins/sink.ctf.fs/assume-single-trace" - -temp_stdout=$(mktemp) -temp_expected_stdout=$(mktemp) -temp_stderr=$(mktemp) -temp_output_dir=$(mktemp -d) - -trace_dir="$temp_output_dir/the-trace" - -plan_tests 7 - -bt_cli "$temp_stdout" "$temp_stderr" \ - "--plugin-path=${data_dir}" \ - -c src.foo.TheSource \ - -c sink.ctf.fs -p "path=\"${trace_dir}\"" -p 'assume-single-trace=true' -ok "$?" "run sink.ctf.fs with assume-single-trace=true" - -# Check stdout. -if [ "$BT_TESTS_OS_TYPE" = "mingw" ]; then - echo "Created CTF trace \`$(cygpath -m ${trace_dir})\`." > "$temp_expected_stdout" -else - echo "Created CTF trace \`${trace_dir}\`." > "$temp_expected_stdout" -fi -bt_diff "$temp_expected_stdout" "$temp_stdout" -ok "$?" "expected message on stdout" - -# Check stderr. -bt_diff "/dev/null" "$temp_stderr" -ok "$?" "stderr is empty" - -# Verify only the expected files exist. -files=("$trace_dir"/*) -num_files=${#files[@]} -is "$num_files" "2" "expected number of files in output directory" - -test -f "$trace_dir/metadata" -ok "$?" "metadata file exists" - -test -f "$trace_dir/the-stream" -ok "$?" "the-stream file exists" - -# Read back the output trace to make sure it's properly formed. -echo "the-event: " > "$temp_expected_stdout" -bt_diff_cli "$temp_expected_stdout" /dev/null "$trace_dir" -ok "$?" "read back output trace" - -rm -f "$temp_stdout" -rm -f "$temp_stderr" -rm -f "$temp_expected_stdout" -rm -f "$trace_dir/metadata" -rm -f "$trace_dir/the-stream" -rmdir "$trace_dir" -rmdir "$temp_output_dir"