changeset 5:57da88814766

Run tester, report
author Chris Cannam
date Sat, 26 Jul 2014 10:50:24 +0100
parents 780c4fc19f3e
children c4ee2ab22c38
files .hgsub .hgsubstate nondeterministic.txt process.sh update-all.sh
diffstat 5 files changed, 54 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsub	Sat Jul 26 10:20:17 2014 +0100
+++ b/.hgsub	Sat Jul 26 10:50:24 2014 +0100
@@ -1,4 +1,5 @@
 vamp-plugin-sdk = https://code.soundsoftware.ac.uk/hg/vamp-plugin-sdk
+vamp-plugin-tester = https://code.soundsoftware.ac.uk/hg/vamp-plugin-tester
 vamp-aubio-plugins = https://code.soundsoftware.ac.uk/hg/vamp-aubio-plugins
 mazurka-plugins = https://code.soundsoftware.ac.uk/hg/mazurka-plugins
 qm-vamp-plugins = https://code.soundsoftware.ac.uk/hg/qm-vamp-plugins
--- a/.hgsubstate	Sat Jul 26 10:20:17 2014 +0100
+++ b/.hgsubstate	Sat Jul 26 10:50:24 2014 +0100
@@ -4,10 +4,11 @@
 a2102b3641b9dc72b29d40c5741da1401faea6f0 pyin
 563246bea6886c626c8fc2a9c9be625f49f86750 qm-vamp-plugins
 4cc12d2d64e47b72122320f5e165b0b534811f24 segmenter-vamp-plugin
-62b92d9b566ad375297f763bbf3407a3546c7f06 silvet
+10d8bd634a7715a40cc790d2eef5d838d1231a58 silvet
 b835875739968beb870e7e09132aa361656a8a30 vamp-aubio-plugins
 32407651025d8334f4d1f93dedbcd492b24bd93a vamp-libxtract-plugins
 717aa5a28254817c48be2450af49b9b84c61c91e vamp-onsetsds-plugin
 57cc0f0c20ff047192660848ac3e1377cb30bf96 vamp-plugin-sdk
+f930285dfe5aa504da1c0dfc5bcc5a0cf441ac30 vamp-plugin-tester
 886d1071c282201f67504690ea6476417193db18 vamp-test-plugin
 4ffac7dedddfbbdffc18f74a71c05e8e0f88bd67 vampy
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nondeterministic.txt	Sat Jul 26 10:50:24 2014 +0100
@@ -0,0 +1,1 @@
+silvet
--- a/process.sh	Sat Jul 26 10:20:17 2014 +0100
+++ b/process.sh	Sat Jul 26 10:50:24 2014 +0100
@@ -61,25 +61,65 @@
     fi
 }
 
+run_tester() {
+    ##!!! todo: list the plugins in each library and run the tester
+    ##!!! separately on each -- that way we can report on specific
+    ##!!! plugins rather than whole libraries (though for the
+    ##!!! "printout" report we should include the whole library test,
+    ##!!! just for information's sake?) and we can have separate
+    ##!!! nondeterministic statuses
+    dir="$1"
+    extra=""
+    if grep -q "^$dir\$" nondeterministic.txt; then
+	extra="-n"
+    fi
+    if VAMP_PATH="$dir" vamp-plugin-tester/vamp-plugin-tester "$extra" -a ; then
+	echo "OK"
+    else
+	echo
+	echo "Tester failed: running again with valgrind and verbose for a report..."
+	VAMP_PATH="$dir" valgrind vamp-plugin-tester/vamp-plugin-tester -v "$extra" -a
+    fi
+}
+
 successes="/tmp/successes.$$.txt"
+partials="/tmp/successes.$$.txt"
 failures="/tmp/failures.$$.txt"
-trap 'rm -f "$successes" "$failures"' 0
+trap 'rm -f "$successes" "$partials" "$failures"' 0
 
-for dir in $(cat .hgsub | awk '{ print $1; }') ; do
+if ! build "vamp-plugin-sdk"; then 
+    echo "Failed to build Vamp plugin SDK!"
+    exit 1
+fi
+
+if ! build "vamp-plugin-tester"; then 
+    echo "Failed to build Vamp plugin tester!"
+    exit 1
+fi
+
+for dir in $(cat .hgsub | grep -v vamp-plugin-sdk | grep -v vamp-plugin-tester | awk '{ print $1; }') ; do
     echo
     echo "Processing: $dir"
     if build "$dir"; then
-	echo "$dir" >> "$successes"
+	if run_tester "$dir"; then
+	    echo "$dir" >> "$successes"
+	else
+	    echo "$dir" >> "$partials"
+	fi
     else
 	echo "$dir" >> "$failures"
     fi
 done
 
 echo
-echo "** Succeeded in building:"
+echo "** Successfully built and tested:"
 cat "$successes"
 
 echo
+echo "** Built, but failed tests:"
+cat "$partials"
+
+echo
 echo "** Failed to build:"	    
 cat "$failures"
 
--- a/update-all.sh	Sat Jul 26 10:20:17 2014 +0100
+++ b/update-all.sh	Sat Jul 26 10:50:24 2014 +0100
@@ -1,4 +1,9 @@
 #!/bin/bash
 cat .hgsub | awk '{ print $1 }' | while read x; do
-    ( cd $x ; hg pull && hg update )
+    if [ -d "$x" ]; then 
+	( cd $x ; hg pull && hg update )
+    else 
+	url=$(grep "^$x " .hgsub | awk '{ print $3; }')
+	hg clone "$url" "$x"
+    fi
 done