comparison tests/test-summaries.sh @ 3:03a02c1f0a9f

* update tests for changed csv format (doh)
author Chris Cannam
date Thu, 11 Dec 2008 11:28:03 +0000
parents 581b1b150a4d
children 0f7c8b9410ef
comparison
equal deleted inserted replaced
2:475f4623feba 3:03a02c1f0a9f
1 #!/bin/bash 1 #!/bin/bash
2 2
3 mypath=`dirname $0` 3 mypath=`dirname $0`
4 r=$mypath/../sonic-annotator 4 r=$mypath/../runner/sonic-annotator
5 5
6 infile=$mypath/audio/3clicks8.wav 6 infile=$mypath/audio/3clicks8.wav
7 tmpfile=$mypath/tmp_1_$$ 7 tmpfile=$mypath/tmp_1_$$
8 tmpcanonical=$mypath/tmp_2_$$ 8 tmpcanonical=$mypath/tmp_2_$$
9 9
60 fail "Output mismatch for transform $stransform" $tmpfile ${sexpected}.csv 60 fail "Output mismatch for transform $stransform" $tmpfile ${sexpected}.csv
61 61
62 $r -t $stransform -w rdf --rdf-stdout $infile > $tmpfile 2>/dev/null || \ 62 $r -t $stransform -w rdf --rdf-stdout $infile > $tmpfile 2>/dev/null || \
63 fail "Fails to run transform $stransform with RDF output" 63 fail "Fails to run transform $stransform with RDF output"
64 64
65 rapper -i turtle $tmpfile -o turtle 2>/dev/null | grep -v '^@prefix :' > $tmpcanonical || 65 rapper -i turtle $tmpfile -o turtle 2>/dev/null | grep -v '^@prefix :' | grep -v 'file:/' > $tmpcanonical ||
66 fail "Fails to produce parseable RDF/TTL for transform $stransform" 66 fail "Fails to produce parseable RDF/TTL for transform $stransform"
67 67
68 cmp -s $tmpcanonical ${sexpected}.n3 || \ 68 cmp -s $tmpcanonical ${sexpected}.n3 || \
69 fail "Output mismatch for canonicalised version of transform $stransform" $tmpcanonical ${sexpected}.n3 69 fail "Output mismatch for canonicalised version of transform $stransform" $tmpcanonical ${sexpected}.n3
70 70