# HG changeset patch # User mas01cr # Date 1190029066 0 # Node ID 7cc3d60274584fd3013e1f761039b22666ed36ad # Parent 71e76fb6e6d2b2d7d7b931d848aa2d44f4e45978 First test case. diff -r 71e76fb6e6d2 -r 7cc3d6027458 tests/0001/run-test.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/0001/run-test.sh Mon Sep 17 11:37:46 2007 +0000 @@ -0,0 +1,15 @@ +# /bin/sh + +trap "exit 1" ERR + +if [ -f testdb ]; then rm -f testdb; fi + +# creation +../../audioDB -N -d testdb + +stat testdb + +# should fail +../../audioDB -N -d testdb && exit 1 + +exit 104 \ No newline at end of file diff -r 71e76fb6e6d2 -r 7cc3d6027458 tests/run-tests.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/run-tests.sh Mon Sep 17 11:37:46 2007 +0000 @@ -0,0 +1,15 @@ +#! /bin/sh + +for file in [0-9][0-9][0-9][0-9]*; do + if [ -d ${file} ]; then + if [ -f ${file}/run-test.sh ]; then + cd ${file} && sh ./run-test.sh > test.out 2> test.err + EXIT_STATUS=$? + if [ ${EXIT_STATUS} -ne 104 ]; then + echo Test ${file} failed: exit status ${EXIT_STATUS} + fi + else + echo Skipping test ${file} + fi + fi +done