#!/bin/bash
-# paraslash test suite helper functions
-# Licensed under the GPL v2. For licencing details see COPYING.
-# uses ideas and code from git's test-lib.sh, Copyright (c) 2005 Junio C Hamano
-
+# Test suite helper functions, uses ideas and code from git's test-lib.sh,
+# Copyright (c) 2005 Junio C Hamano. Licensed under the GPL v2, see file
+# COPYING.
get_audio_file_paths()
{
test_duration()
{
local t=$(exec 2>&1 1>/dev/null; time -p "$@")
- result=$(awk '{print $2 * 1000}' <<< $t)
+ result=$(awk '{print $2 * 1000; exit 0}' <<< "$t")
}
test_expect_success()
{
local wd=$(pwd)
- test_dir="$wd/${0%/*}"
+ test_dir="$(realpath $wd/${0%/*})"
test_audio_file_dir="$test_dir/audio_files"
[[ -z "$o_results_dir" ]] && o_results_dir="$test_dir/test-results"
fixup_dirs
[[ -z "$o_executables" ]] && o_executables="para_afh para_audioc para_audiod
- para_client para_fade para_filter para_gui para_recv para_server
+ para_client para_mixer para_filter para_gui para_recv para_server
para_write"
for exe in $o_executables; do
export $(tr 'a-z' 'A-Z' <<< $exe)="$o_executables_dir/$exe"