#!/bin/bash # # SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2019 Simon Marchi # # Test how log level options are applied to sources auto-discovered by the # convert command. 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 SH_TAP=1 source "$UTILSSH" NUM_TESTS=4 plan_tests $NUM_TESTS data_dir="${BT_TESTS_DATADIR}/auto-source-discovery/params-log-level" plugin_dir="${data_dir}" dir_a="${data_dir}/dir-a" dir_b="${data_dir}/dir-b" dir_ab="${data_dir}/dir-ab" expected_file=$(mktemp -t expected.XXXXXX) print_log_level=(--params 'what="log-level"') details_sink=("-c" "sink.text.details" "--params=with-metadata=false") debug=2 trace=1 # Apply log level to two components from one non-option argument. cat > "$expected_file" < "$expected_file" < "$expected_file" < "$expected_file" <