changeset 142:03fbd6a204fd

Add script to run timing and evaluation for a specific revision
author Chris Cannam
date Thu, 08 May 2014 14:39:41 +0100
parents 21efe7d37c4c
children fe3c902ccb90
files testdata/timing/run-for-revision.sh testdata/timing/run.sh
diffstat 2 files changed, 40 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/testdata/timing/run-for-revision.sh	Thu May 08 14:39:41 2014 +0100
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+revision="$1"
+
+if [ -z "$revision" ]; then
+    echo "Usage: run-for-revision.sh <hg-revision-id>"
+    exit 2
+fi
+
+tmppath="../../../silvet-hg-$revision-$$"
+
+echo
+echo "Running timing and validation test script for revision $revision..."
+
+echo
+echo "Cloning into $tmppath..."
+
+hg clone -r"$revision" ../.. "$tmppath" || exit 1
+
+echo 
+echo "Building..."
+
+( cd "$tmppath" && make -f Makefile.linux ) || exit 1
+
+echo
+echo "Copying plugin to local directory..."
+
+cp "$tmppath"/silvet.so ../.. || exit 1
+
+rm -r "$tmppath" 
+
+echo
+echo "Running timing and evaluation script..."
+
+./run.sh
+
+echo
+echo "Done, for revision $revision"
--- a/testdata/timing/run.sh	Thu May 08 13:54:08 2014 +0100
+++ b/testdata/timing/run.sh	Thu May 08 14:39:41 2014 +0100
@@ -22,6 +22,8 @@
 
 outfile="/tmp/$$"
 
+trap 'rm -f "$outfile" "$outfile.lab"' 0
+
 time sonic-annotator \
     --writer csv \
     --csv-one-file "$outfile" \
@@ -50,4 +52,3 @@
 
 echo
 
-rm "$outfile" "$outfile.lab"