Mercurial > hg > sonic-annotator
comparison tests/include.sh @ 221:b1ac129e2c00
Update version number in tests, and also disregard version number mismatches in JAMS output (as they're inevitable)
author | Chris Cannam |
---|---|
date | Mon, 23 Nov 2015 10:56:19 +0000 |
parents | c17b184c16db |
children | 4941e8b167c0 |
comparison
equal
deleted
inserted
replaced
220:20bf837f53ab | 221:b1ac129e2c00 |
---|---|
11 exit 1;; | 11 exit 1;; |
12 *) | 12 *) |
13 ;; | 13 ;; |
14 esac | 14 esac |
15 | 15 |
16 version=1.3 | 16 version=1.4 |
17 nextversion=1.4 | 17 nextversion=1.5 |
18 | 18 |
19 testdir=$mypath/.. | 19 testdir=$mypath/.. |
20 r=$testdir/../sonic-annotator | 20 r=$testdir/../sonic-annotator |
21 | 21 |
22 audiopath=$testdir/audio | 22 audiopath=$testdir/audio |
58 rm "${a}__" "${b}__" | 58 rm "${a}__" "${b}__" |
59 return $rv | 59 return $rv |
60 } | 60 } |
61 | 61 |
62 jsoncompare() { | 62 jsoncompare() { |
63 # The Sonic Annotator version number appears in the JAMS output -- | |
64 # filter that out, and also reformat to ignore whitespace differences | |
63 a="$1" | 65 a="$1" |
64 b="$2" | 66 b="$2" |
65 cat "$a" | json_reformat > "${a}__" | 67 cat "$a" | sed 's/Sonic Annotator v[0-9.]*/Sonic Annotator vXXX/' | json_reformat > "${a}__" |
66 cat "$b" | json_reformat > "${b}__" | 68 cat "$b" | sed 's/Sonic Annotator v[0-9.]*/Sonic Annotator vXXX/' | json_reformat > "${b}__" |
67 cmp -s "$a" "$b" | 69 cmp -s "${a}__" "${b}__" |
68 rv=$? | 70 rv=$? |
69 rm "${a}__" "${b}__" | 71 rm "${a}__" "${b}__" |
70 return $rv | 72 return $rv |
71 } | 73 } |
72 | 74 |