comparison 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
comparison
equal deleted inserted replaced
207:e8f2f530c091 208:c17b184c16db
22 22
23 check_json "$tmpjson" "test plugin output $output" 23 check_json "$tmpjson" "test plugin output $output"
24 24
25 done 25 done
26 26
27 # Now check for valid results, for a subset 27 # If JAMS is installed, we can report on whether the outputs are valid
28 # JAMS schema files or not -- unfortunately we can't comply with the
29 # schema for most real plugins, so we can only make indicative reports
30 # for most. This is such a limited test that we make it optional; it's
31 # a bit much to expect everyone to have JAMS installed just for
32 # this. Also the JAMS verifier doesn't currently always work for me
33 # (e.g. it doesn't seem to work correctly with Python 3 at the moment)
34 # so let's not make this fatal either.
35
36 if jams_to_lab.py --help >/dev/null 2>&1; then
37
38 $r -t "$transformdir/onsets.n3" $mandatory --jams-one-file "$tmpjson" --jams-force "$infile" 2>/dev/null || \
39 fail "Failed to run for onsets"
40
41 if ! jams_to_lab.py "$tmpjson" test; then
42 echo "WARNING: JAMS schema verification failed for onsets"
43 fi
44 fi
45
46 # Now check against expected output, for a subset
28 47
29 for output in instants curve-fsr grid-oss notes-regions; do 48 for output in instants curve-fsr grid-oss notes-regions; do
30 49
31 $r -d "$testplug:$output" $mandatory --jams-one-file "$tmpjson" --jams-force "$silentfile" 2>/dev/null || \ 50 $r -d "$testplug:$output" $mandatory --jams-one-file "$tmpjson" --jams-force "$silentfile" 2>/dev/null || \
32 fail "Failed to run for plugin $testplug with output $output" 51 fail "Failed to run for plugin $testplug with output $output"