Mercurial > hg > sonic-annotator
comparison tests/test-multiple-audio.sh @ 103:344d5982bbf8
Add simple test for multiple audio file input and playlists
author | Chris Cannam |
---|---|
date | Wed, 01 Oct 2014 15:18:45 +0100 |
parents | |
children | 4852625eb62b |
comparison
equal
deleted
inserted
replaced
102:fae326c22df5 | 103:344d5982bbf8 |
---|---|
1 #!/bin/bash | |
2 | |
3 mypath=`dirname $0` | |
4 r=$mypath/../sonic-annotator | |
5 | |
6 tmpfile=$mypath/tmp_1_$$ | |
7 | |
8 trap "rm -f $tmpfile" 0 | |
9 | |
10 . test-include.sh | |
11 | |
12 transform=$mypath/transforms/transforms-summaries-percussiononsets-detectionfunction.n3 | |
13 | |
14 # Note, the output here depends on all the audio files present -- we | |
15 # would have to regenerate it if we added more test audio files | |
16 $r -t $transform -w csv --csv-stdout $mypath -r --summary-only > $tmpfile 2>/dev/null || \ | |
17 fail "Fails to run transform $transform with recursive dir option" | |
18 | |
19 expected=$mypath/expected/transforms-summaries-percussiononsets-all-files | |
20 csvcompare $tmpfile $expected.csv || \ | |
21 fail "Output mismatch for transform $transform with summaries and recursive dir option" | |
22 | |
23 # Here we remove any leading path from the audio file in the output, | |
24 # because the playlist reader will have resolved files to absolute | |
25 # paths and those will differ between systems | |
26 $r -t $transform -w csv --csv-stdout $mypath/audio/playlist.m3u --summary-only 2>/dev/null | sed 's,^"\.*/[^"]*/,",' > $tmpfile || \ | |
27 fail "Fails to run transform $transform with playlist input" | |
28 | |
29 expected=$mypath/expected/transforms-summaries-percussiononsets-playlist | |
30 csvcompare $tmpfile $expected.csv || \ | |
31 fail "Output mismatch for transform $transform with summaries and playlist input" | |
32 | |
33 | |
34 |