Mercurial > hg > sonic-annotator
diff tests/test-jams-writer/test-jams-writer.sh @ 208:c17b184c16db
Update JAMS output to JAMS v0.2.0. We now (for the first time?!) write actual JAMS schema-compliant output when possible, though it isn't possible for many types of plugin. The output for all tested combinations of transforms is valid JSON even where it isn't schema-compliant.
author | Chris Cannam |
---|---|
date | Wed, 04 Nov 2015 10:07:29 +0000 |
parents | 1f8fef5c6ea2 |
children | c9be1a6f7d74 |
line wrap: on
line diff
--- a/tests/test-jams-writer/test-jams-writer.sh Tue Nov 03 14:31:59 2015 +0000 +++ b/tests/test-jams-writer/test-jams-writer.sh Wed Nov 04 10:07:29 2015 +0000 @@ -24,7 +24,26 @@ done -# Now check for valid results, for a subset +# If JAMS is installed, we can report on whether the outputs are valid +# JAMS schema files or not -- unfortunately we can't comply with the +# schema for most real plugins, so we can only make indicative reports +# for most. This is such a limited test that we make it optional; it's +# a bit much to expect everyone to have JAMS installed just for +# this. Also the JAMS verifier doesn't currently always work for me +# (e.g. it doesn't seem to work correctly with Python 3 at the moment) +# so let's not make this fatal either. + +if jams_to_lab.py --help >/dev/null 2>&1; then + + $r -t "$transformdir/onsets.n3" $mandatory --jams-one-file "$tmpjson" --jams-force "$infile" 2>/dev/null || \ + fail "Failed to run for onsets" + + if ! jams_to_lab.py "$tmpjson" test; then + echo "WARNING: JAMS schema verification failed for onsets" + fi +fi + +# Now check against expected output, for a subset for output in instants curve-fsr grid-oss notes-regions; do