Commit 1773d511 authored by conrad's avatar conrad

move seek-stress into tests, always run it on all .ogg,.anx,.spx files in $HOME


git-svn-id: http://svn.annodex.net/liboggz/trunk@779 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 052ba2da
......@@ -14,7 +14,7 @@ endif
endif
if OGGZ_CONFIG_READ
oggz_read_programs = read-file read-io seek-stress
oggz_read_programs = read-file read-io
endif
if OGGZ_CONFIG_WRITE
......@@ -34,9 +34,6 @@ read_file_LDADD = $(OGGZ_LIBS)
read_io_SOURCES = read-io.c
read_io_LDADD = $(OGGZ_LIBS)
seek_stress_SOURCES = seek-stress.c
seek_stress_LDADD = $(OGGZ_LIBS)
write_feed_SOURCES = write-feed.c
write_feed_LDADD = $(OGGZ_LIBS)
......
......@@ -26,11 +26,17 @@ rw_tests = read-generated read-stop-ok read-stop-err \
endif
endif
TESTS = $(write_tests) $(rw_tests)
if OGGZ_CONFIG_READ
seek_progs = seek-stress
seek_tests = seek-stress-test.sh
endif
noinst_PROGRAMS = $(TESTS)
noinst_SCRIPTS = $(seek_tests)
noinst_PROGRAMS = $(write_tests) $(rw_tests) $(seek_progs)
noinst_HEADERS = oggz_tests.h
TESTS = $(write_tests) $(rw_tests) $(seek_tests)
write_bad_guard_SOURCES = write-bad-guard.c
write_bad_guard_LDADD = $(OGGZ_LIBS)
......@@ -81,3 +87,6 @@ io_read_single_LDADD = $(OGGZ_LIBS)
io_write_flush_SOURCES = io-write-flush.c
io_write_flush_LDADD = $(OGGZ_LIBS)
seek_stress_SOURCES = seek-stress.c
seek_stress_LDADD = $(OGGZ_LIBS)
#!/bin/sh
VERBOSE=""
THIS="seek-stress-test.sh"
COLLECTION="$HOME"
usage () {
echo >&2 "$THIS, stress oggz's seeking using a collection of Ogg files"
echo >&2
echo >&2 "Usage: $THIS [options] [directory]"
echo >&2
echo >&2 "If no directory is specified, $THIS defaults to reading all"
echo >&2 "Ogg files found in your home directory."
echo >&2
echo >&2 "Miscellaneous options"
echo >&2 " -h, --help Display this help and exit"
echo >&2 " -v, --verbose Print informative messages"
echo >&2
exit 1
}
GETOPTEST=`getopt --version`
SHORTOPTS="hv"
case $GETOPTEST in
getopt*) # GNU getopt
TEMP=`getopt -l help -l verbose -- +$SHORTOPTS $@`
;;
*) # POSIX getopt ?
TEMP=`getopt $SHORTOPTS $@`
;;
esac
if test "$?" != "0"; then
usage
fi
eval set -- "$TEMP"
while test "X$1" != "X--"; do
case "$1" in
-v|--verbose)
VERBOSE="--verbose"
;;
-h|--help)
usage
;;
esac
shift
done
# Check that all options parsed ok
if test "x$1" != "x--"; then
usage
fi
shift #get rid of the "--"
if test "x$1" != "x"; then
COLLECTION=$1
fi
echo "Stress testing Oggz seeking on all Ogg files in $COLLECTION..."
for ext in ogg spx anx; do
CMD="find $COLLECTION -follow -name '*.$ext'"
FILES="$FILES `eval $CMD`"
done
for i in $FILES; do
./seek-stress $VERBOSE $i;
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment