changeset 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 20bf837f53ab
children 6153429ebf89
files tests/include.sh
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tests/include.sh	Fri Nov 20 09:32:26 2015 +0000
+++ b/tests/include.sh	Mon Nov 23 10:56:19 2015 +0000
@@ -13,8 +13,8 @@
     ;;
 esac
 
-version=1.3
-nextversion=1.4
+version=1.4
+nextversion=1.5
 
 testdir=$mypath/..
 r=$testdir/../sonic-annotator
@@ -60,11 +60,13 @@
 }
 
 jsoncompare() {
+    # The Sonic Annotator version number appears in the JAMS output --
+    # filter that out, and also reformat to ignore whitespace differences
     a="$1"
     b="$2"
-    cat "$a" | json_reformat > "${a}__"
-    cat "$b" | json_reformat > "${b}__"
-    cmp -s "$a" "$b"
+    cat "$a" | sed 's/Sonic Annotator v[0-9.]*/Sonic Annotator vXXX/' | json_reformat > "${a}__"
+    cat "$b" | sed 's/Sonic Annotator v[0-9.]*/Sonic Annotator vXXX/' | json_reformat > "${b}__"
+    cmp -s "${a}__" "${b}__"
     rv=$?
     rm "${a}__" "${b}__"
     return $rv