changeset 46:1853beeb0521

Script to clean up after running tests. Deletes all files matching */test*; You Have Been Warned.
author mas01cr
date Mon, 17 Sep 2007 16:10:44 +0000
parents 538064755914
children 092648f9b532
files tests/0003/run-test.sh tests/clean.sh
diffstat 2 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/0003/run-test.sh	Mon Sep 17 15:23:06 2007 +0000
+++ b/tests/0003/run-test.sh	Mon Sep 17 16:10:44 2007 +0000
@@ -15,11 +15,11 @@
 
 ${AUDIODB} -d testdb -I -f testfeature
 
-${AUDIODB} -d testdb -Q point -f testfeature > query-output
+${AUDIODB} -d testdb -Q point -f testfeature > test-query-output
 
-echo testfeature 1 0 0 > test-query-output
+echo testfeature 1 0 0 > test-expected-query-output
 
-cmp query-output test-query-output
+cmp test-query-output test-expected-query-output
 
 # failure cases
 ${AUDIODB} -d testdb -I && exit 1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/clean.sh	Mon Sep 17 16:10:44 2007 +0000
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+for file in [0-9][0-9][0-9][0-9]*; do
+  if [ -d ${file} ]; then
+    echo Cleaning ${file}
+    rm -f ${file}/test*
+    if [ -f ${file}/clean.sh ]; then
+      (cd ${file} && sh ./clean.sh)
+    fi
+  fi
+done