# HG changeset patch # User mas01cr # Date 1194260093 0 # Node ID 218106b4db1459c4add805c94f1a45ee24d67173 # Parent b852e652a9a123e19db5a1ba4f4a416d2fa1b76a Add a test for dump/restore functionality. Since it takes a long time (and must be run after the other tests), put it in 9000/ and adjust run-tests.sh to take a --full argument. diff -r b852e652a9a1 -r 218106b4db14 tests/9000/run-test.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/9000/run-test.sh Mon Nov 05 10:54:53 2007 +0000 @@ -0,0 +1,18 @@ +#! /bin/sh + +. ../test-utils.sh + +for file in `find .. -name testdb -print | sort -n` +do + dir=`mktemp -d` + echo dumping "${file}" into "${dir}/${file:3:4}" + ${AUDIODB} -d ${file} -D --output="${dir}/${file:3:4}" + echo restoring "${file}" into "${dir}"/"${file:3:4}"/restoredb + export restoreadb=${AUDIODB} + (export AUDIODB=`pwd`/$restoreadb && cd "${dir}"/"${file:3:4}" && sh ./restore.sh restoredb) + echo comparing dbs for "${file:3:4}" + cmp "${file}" "${dir}"/"${file:3:4}"/restoredb + rm -rf "${dir}" +done + +exit 104 diff -r b852e652a9a1 -r 218106b4db14 tests/9000/short-description --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/9000/short-description Mon Nov 05 10:54:53 2007 +0000 @@ -0,0 +1,1 @@ +dump/restore of testdbs \ No newline at end of file diff -r b852e652a9a1 -r 218106b4db14 tests/run-tests.sh --- a/tests/run-tests.sh Thu Nov 01 15:18:17 2007 +0000 +++ b/tests/run-tests.sh Mon Nov 05 10:54:53 2007 +0000 @@ -10,7 +10,13 @@ exit 1 fi -for file in [0-9][0-9][0-9][0-9]*; do +if [ "$1" = "--full" ]; then + pattern="[0-9][0-9][0-9][0-9]*" +else + pattern="[0-8][0-9][0-9][0-9]*" +fi + +for file in ${pattern}; do if [ -d ${file} ]; then if [ -f ${file}/run-test.sh ]; then echo -n Running test ${file}