Mercurial > hg > sonic-annotator
view tests/test-include.sh @ 77:adce5f7e2917 qt5
Don't need to check for Dataquay, and in fact we can pick up the wrong version if we do. Just assume it is available (building in e.g. sv subdir configuration)
author | Chris Cannam |
---|---|
date | Tue, 07 May 2013 15:58:20 +0100 |
parents | 2633976fbef5 |
children | 8b4924a9a072 |
line wrap: on
line source
fail() { echo "Test failed: $1" exit 1 } csvcompare() { # permit some fuzz in final few digits a="$1" b="$2" perl -p -e 's/(\d+\.\d{6})\d+/$1/' "$a" > "${a}__" perl -p -e 's/(\d+\.\d{6})\d+/$1/' "$b" > "${b}__" cmp -s "${a}__" "${b}__" rv=$? rm "${a}__" "${b}__" return $rv } csvcompare_ignorefirst() { # a bit like the above, but ignoring first column (and without temp files) out=`cat "$1" "$2" | cut -d, -f2- | perl -p -e 's/(\d+\.\d{6})\d+/$1/' | sort | uniq -c | grep -v ' 2 '` return `[ -z "$out" ]` }