annotate tests/run-tests.sh @ 548:e18843dc0aea

Implement a rudimentary API for audioDB::liszt The API is rudimentary because we've dropped support for the incremental retrieval of tracks and their number of vectors (at the API level; the SOAP and command-line support is still there -- no changes should be visible). This is potentially bad for the large-scale databases, of course; one million tracks will take of the order of 16MB of RAM, more if I'm unlucky about how std::string.c_str() is implemented. Both this liszt operation and querying (and sampling, forthcoming...) would benefit from a `cursor-like' interface to retrieval results: for an API like that, instead of getting a struct with the data there, you get a cookie with which you can ask the database for successive results. This would be neat for all sorts of reasons. In the meantime, at least this change fixes SOAP memory leaks related to liszt. Make liszt.o part of LIBOBJS rather than ordinary OBJS, so that the liszt functionality is actually compiled into the library. Add a test for this library functionality; also modify the command-line test file to run the SOAP server on its own port.
author mas01cr
date Wed, 11 Feb 2009 12:38:03 +0000
parents 216b55457009
children
rev   line source
mas01cr@252 1 #! /bin/bash
mas01cr@38 2
mas01cr@39 3 AUDIODB=../../${EXECUTABLE:-audioDB}
mas01cr@39 4 export AUDIODB
mas01cr@39 5
mas01cr@252 6 if [ -x ${AUDIODB#../} ]; then
mas01cr@39 7 :
mas01cr@39 8 else
mas01cr@252 9 echo Cannot execute audioDB: ${AUDIODB#../}
mas01cr@39 10 exit 1
mas01cr@39 11 fi
mas01cr@39 12
mas01cr@164 13 if [ "$1" = "--full" ]; then
mas01cr@164 14 pattern="[0-9][0-9][0-9][0-9]*"
mas01cr@164 15 else
mas01cr@164 16 pattern="[0-8][0-9][0-9][0-9]*"
mas01cr@164 17 fi
mas01cr@164 18
mas01cr@164 19 for file in ${pattern}; do
mas01cr@38 20 if [ -d ${file} ]; then
mas01cr@38 21 if [ -f ${file}/run-test.sh ]; then
mas01cr@505 22 echo -n Running command-line test ${file}
mas01cr@67 23 if [ -f ${file}/short-description ]; then
mas01cr@67 24 awk '{ printf(" (%s)",$0) }' < ${file}/short-description
mas01cr@67 25 fi
mas01cr@67 26 echo -n :
mas01cr@252 27 (cd ${file} && /bin/bash ./run-test.sh > test.out 2> test.err)
mas01cr@38 28 EXIT_STATUS=$?
mas01cr@239 29 if [ ${EXIT_STATUS} -eq 14 ]; then
mas01cr@239 30 echo " n/a."
mas01cr@239 31 elif [ ${EXIT_STATUS} -ne 104 ]; then
mas01cr@239 32 echo " failed (exit status ${EXIT_STATUS})."
mas01cr@67 33 FAILED=true
mas01cr@67 34 else
mas01cr@67 35 echo " success."
mas01cr@38 36 fi
mas01cr@38 37 else
mas01cr@38 38 echo Skipping test ${file}
mas01cr@38 39 fi
mas01cr@38 40 fi
mas01cr@38 41 done
mas01cr@67 42
mas01cr@73 43 if [ -z "${FAILED}" ]; then
mas01cr@67 44 exit 0
mas01cr@67 45 else
mas01cr@67 46 exit 1
mas01cr@67 47 fi