echo "Running: $BT_TESTS_BT2_BIN ${args[*]}" >&2
run_python_bt2 "$BT_TESTS_BT2_BIN" "${args[@]}" 1>"$stdout_file" 2>"$stderr_file"
echo "Running: $BT_TESTS_BT2_BIN ${args[*]}" >&2
run_python_bt2 "$BT_TESTS_BT2_BIN" "${args[@]}" 1>"$stdout_file" 2>"$stderr_file"
# Returns 0 if there's no difference, or 1 otherwise, also printing said
# difference to the standard error.
bt_diff_cli() {
# Returns 0 if there's no difference, or 1 otherwise, also printing said
# difference to the standard error.
bt_diff_cli() {
- local temp_stdout_output_file
- local temp_stderr_output_file
+ local -r temp_stdout_output_file="$(mktemp -t actual-stdout.XXXXXX)"
+ local -r temp_stderr_output_file="$(mktemp -t actual-stderr.XXXXXX)"
bt_cli "$temp_stdout_output_file" "$temp_stderr_output_file" "${args[@]}"
bt_diff "$expected_stdout_file" "$temp_stdout_output_file" "${args[@]}"
bt_cli "$temp_stdout_output_file" "$temp_stderr_output_file" "${args[@]}"
bt_diff "$expected_stdout_file" "$temp_stdout_output_file" "${args[@]}"
# Returns 0 if there's no difference, or 1 otherwise, also printing said
# difference to the standard error.
bt_diff_details_ctf_single() {
# Returns 0 if there's no difference, or 1 otherwise, also printing said
# difference to the standard error.
bt_diff_details_ctf_single() {