Mercurial > hg > sonic-annotator
comparison tests/test-multiple-audio/test-multiple-audio.sh @ 281:c8162c2992f8 piper-nopiper
Further test updates. The AF results should match to 3dp with different MAD builds. The onset position results hopefully should match completely now prefix sorted, let's see.
author | Chris Cannam |
---|---|
date | Tue, 29 Nov 2016 17:14:21 +0000 |
parents | 5db279f1e0f8 |
children |
comparison
equal
deleted
inserted
replaced
280:cb29834ce827 | 281:c8162c2992f8 |
---|---|
22 | 22 |
23 # Note, the output here depends on all the audio files present -- we | 23 # Note, the output here depends on all the audio files present -- we |
24 # would have to regenerate it if we added more test audio files. Note | 24 # would have to regenerate it if we added more test audio files. Note |
25 # that the -r flag is not supposed to pick up playlist files, only | 25 # that the -r flag is not supposed to pick up playlist files, only |
26 # audio files | 26 # audio files |
27 $r -t $transform -w csv --csv-stdout -r --summary-only $audiopath > $tmpfile1 2>/dev/null || \ | 27 $r -t $transform -w csv --csv-digits 3 --csv-stdout -r --summary-only $audiopath > $tmpfile1 2>/dev/null || \ |
28 fail "Fails to run transform $transform with recursive dir option" | 28 fail "Fails to run transform $transform with recursive dir option" |
29 | 29 |
30 expected=$mypath/expected/all-files | 30 expected=$mypath/expected/all-files |
31 csvcompare $tmpfile1 $expected.csv || \ | 31 csvcompare $tmpfile1 $expected.csv || \ |
32 faildiff "Output mismatch for transform $transform with summaries and recursive dir option" $tmpfile1 $expected.csv | 32 faildiff "Output mismatch for transform $transform with summaries and recursive dir option" $tmpfile1 $expected.csv |
35 # 2. Local playlist file referring to local audio files | 35 # 2. Local playlist file referring to local audio files |
36 | 36 |
37 # Here we strip any leading path from the audio file in the output, | 37 # Here we strip any leading path from the audio file in the output, |
38 # because the playlist reader will have resolved files to absolute | 38 # because the playlist reader will have resolved files to absolute |
39 # paths and those will differ between systems | 39 # paths and those will differ between systems |
40 $r -t $transform -w csv --csv-stdout $audiopath/playlist.m3u --summary-only 2>/dev/null > "$tmpfile2" || \ | 40 $r -t $transform -w csv --csv-digits 3 --csv-stdout $audiopath/playlist.m3u --summary-only 2>/dev/null > "$tmpfile2" || \ |
41 fail "Fails to run transform $transform with playlist input" | 41 fail "Fails to run transform $transform with playlist input" |
42 | 42 |
43 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" | 43 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" |
44 | 44 |
45 expected=$mypath/expected/playlist | 45 expected=$mypath/expected/playlist |
49 | 49 |
50 # 3. Multiple files supplied directly on command line | 50 # 3. Multiple files supplied directly on command line |
51 | 51 |
52 # Strip paths again, just so we can use the same output comparison | 52 # Strip paths again, just so we can use the same output comparison |
53 # file as above | 53 # file as above |
54 $r -t $transform -w csv --csv-stdout $audiopath/3clicks.mp3 $audiopath/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \ | 54 $r -t $transform -w csv --csv-digits 3 --csv-stdout $audiopath/3clicks.mp3 $audiopath/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \ |
55 fail "Fails to run transform $transform with 2-file input" | 55 fail "Fails to run transform $transform with 2-file input" |
56 | 56 |
57 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" | 57 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" |
58 | 58 |
59 expected=$mypath/expected/playlist | 59 expected=$mypath/expected/playlist |
61 faildiff "Output mismatch for transform $transform with summaries and 2-file input" $tmpfile1 $expected.csv | 61 faildiff "Output mismatch for transform $transform with summaries and 2-file input" $tmpfile1 $expected.csv |
62 | 62 |
63 | 63 |
64 # 4. Multiple files supplied directly on command line, with file: URL | 64 # 4. Multiple files supplied directly on command line, with file: URL |
65 | 65 |
66 $r -t $transform -w csv --csv-stdout $audiopath/3clicks.mp3 file://`pwd`/$audiopath/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \ | 66 $r -t $transform -w csv --csv-digits 3 --csv-stdout $audiopath/3clicks.mp3 file://`pwd`/$audiopath/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \ |
67 fail "Fails to run transform $transform with 2-file input" | 67 fail "Fails to run transform $transform with 2-file input" |
68 | 68 |
69 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" | 69 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" |
70 | 70 |
71 expected=$mypath/expected/playlist | 71 expected=$mypath/expected/playlist |
75 | 75 |
76 if [ "$have_network" = "yes" ]; then | 76 if [ "$have_network" = "yes" ]; then |
77 | 77 |
78 # 5. Remote playlist file referring to remote audio files | 78 # 5. Remote playlist file referring to remote audio files |
79 | 79 |
80 $r -t $transform -w csv --csv-stdout $urlbase/playlist.m3u --summary-only 2>/dev/null > $tmpfile2 || \ | 80 $r -t $transform -w csv --csv-digits 3 --csv-stdout $urlbase/playlist.m3u --summary-only 2>/dev/null > $tmpfile2 || \ |
81 fail "Fails to run transform $transform with remote playlist input" | 81 fail "Fails to run transform $transform with remote playlist input" |
82 | 82 |
83 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" | 83 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" |
84 | 84 |
85 expected=$mypath/expected/playlist | 85 expected=$mypath/expected/playlist |
87 faildiff "Output mismatch for transform $transform with summaries and remote playlist input" $tmpfile1 $expected.csv | 87 faildiff "Output mismatch for transform $transform with summaries and remote playlist input" $tmpfile1 $expected.csv |
88 | 88 |
89 | 89 |
90 # 6. Local playlist file referring to mixture of remote and local audio files | 90 # 6. Local playlist file referring to mixture of remote and local audio files |
91 | 91 |
92 $r -t $transform -w csv --csv-stdout $audiopath/remote-playlist.m3u --summary-only 2>/dev/null > $tmpfile2 || \ | 92 $r -t $transform -w csv --csv-digits 3 --csv-stdout $audiopath/remote-playlist.m3u --summary-only 2>/dev/null > $tmpfile2 || \ |
93 fail "Fails to run transform $transform with playlist of remote files" | 93 fail "Fails to run transform $transform with playlist of remote files" |
94 | 94 |
95 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" | 95 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" |
96 | 96 |
97 expected=$mypath/expected/playlist | 97 expected=$mypath/expected/playlist |
99 faildiff "Output mismatch for transform $transform with summaries and remote playlist input" $tmpfile1 $expected.csv | 99 faildiff "Output mismatch for transform $transform with summaries and remote playlist input" $tmpfile1 $expected.csv |
100 | 100 |
101 | 101 |
102 # 7. Multiple remote files supplied directly on command line | 102 # 7. Multiple remote files supplied directly on command line |
103 | 103 |
104 $r -t $transform -w csv --csv-stdout $urlbase/3clicks.mp3 $urlbase/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \ | 104 $r -t $transform -w csv --csv-digits 3 --csv-stdout $urlbase/3clicks.mp3 $urlbase/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \ |
105 fail "Fails to run transform $transform with 2-file remote input" | 105 fail "Fails to run transform $transform with 2-file remote input" |
106 | 106 |
107 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" | 107 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" |
108 | 108 |
109 expected=$mypath/expected/playlist | 109 expected=$mypath/expected/playlist |
111 faildiff "Output mismatch for transform $transform with summaries and 2-file input" $tmpfile1 $expected.csv | 111 faildiff "Output mismatch for transform $transform with summaries and 2-file input" $tmpfile1 $expected.csv |
112 | 112 |
113 | 113 |
114 # 8. Mixture of remote and local files supplied on command line | 114 # 8. Mixture of remote and local files supplied on command line |
115 | 115 |
116 $r -t $transform -w csv --csv-stdout $audiopath/3clicks.mp3 $urlbase/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \ | 116 $r -t $transform -w csv --csv-digits 3 --csv-stdout $audiopath/3clicks.mp3 $urlbase/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \ |
117 fail "Fails to run transform $transform with 2-file remote input" | 117 fail "Fails to run transform $transform with 2-file remote input" |
118 | 118 |
119 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" | 119 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" |
120 | 120 |
121 expected=$mypath/expected/playlist | 121 expected=$mypath/expected/playlist |
124 | 124 |
125 fi | 125 fi |
126 | 126 |
127 # 9. As 3, but multiplexing rather than extracting separately from each file | 127 # 9. As 3, but multiplexing rather than extracting separately from each file |
128 | 128 |
129 $r -t $transform --multiplex -w csv --csv-stdout $audiopath/3clicks.mp3 $audiopath/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \ | 129 $r -t $transform --multiplex --csv-digits 3 -w csv --csv-stdout $audiopath/3clicks.mp3 $audiopath/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \ |
130 fail "Fails to run transform $transform with 2-file input" | 130 fail "Fails to run transform $transform with 2-file input" |
131 | 131 |
132 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" | 132 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1" |
133 | 133 |
134 expected=$mypath/expected/multiplexed | 134 expected=$mypath/expected/multiplexed |