blob: f2005e2bf87349fcfcad62ce7580ac21b913da4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/usr/bin/env bash
test_description='Measure time to decode ogg/vorbis files.
Executes para_filter -f oggdec on the test files provided by the
test suite and fails if it takes much longer than the reference
implementation.'
. ${0%/*}/test-lib.bash
test_require_objects "oggdec_filter"
missing_objects="$result"
get_audio_file_paths ogg
oggs="$result"
test_require_executables "oggdec"
missing_executables="$result"
for ogg in $oggs; do
if [[ -n "$missing_objects" ]]; then
test_skip "${ogg##*/}" "missing object(s): $missing_objects"
continue
fi
if [[ -n "$missing_executables" ]]; then
test_skip "${ogg##*/}" \
"missing executables(s): $missing_executables"
continue
fi
test_expect_success "${ogg##*/}" '
test_duration oggdec --quiet --raw --output - - < $ogg &&
t1=$result &&
test_duration $PARA_FILTER -f oggdec < $ogg &&
t2=$result &&
echo "oggdec: $t1, para_filter: $t2"
(($t2 <= $t1 * 3 / 2 + 100))
'
done
test_done
|