Statistics
| Branch: | Revision:

ffmpeg / tests / ffserver-regression.sh @ 3732c483

History | View | Annotate | Download (1.3 KB)

1 2d83fe90 Diego Biurrun
#!/bin/sh
2 115329f1 Diego Biurrun
3 688a4773 Diego Biurrun
#perl -e 'chomp($wd = `pwd`); print map { s!tests/data/!!; "<Stream $_>\nFile $wd/tests/data/$_\n</Stream>\n\n" } @ARGV' tests/data/a* >> tests/data/ffserver.conf
4
#perl -e 'chomp($wd = `pwd`); print map { s!tests/data/!!; "<Stream $_.asf>\nFile $wd/tests/data/$_\n</Stream>\n\n" } @ARGV' tests/data/a* >> tests/data/ffserver.conf
5 d746f928 Philip Gladstone
6 fc8cb398 Måns Rullgård
. $(dirname $0)/md5.sh
7 66d23c96 Diego Biurrun
8 3d147064 Diego Biurrun
FILES=$(sed -n 's/^[^#]*<Stream \(.*\)>.*/\1/p' $2 | grep -v html)
9 e2b2851e Philip Gladstone
10 4fbd52f0 Diego Biurrun
rm -f tests/feed1.ffm
11 968ae1d9 Måns Rullgård
./ffserver -d -f "$2" 2> /dev/null &
12 e2b2851e Philip Gladstone
FFSERVER_PID=$!
13 508826f9 Alex Beregszaszi
echo "Waiting for feeds to startup..."
14 626932fd Baptiste Coudurier
sleep 2
15 e2b2851e Philip Gladstone
(
16 4fbd52f0 Diego Biurrun
    cd tests/data || exit $?
17 21f7ab7a Måns Rullgård
    rm -f ff-* ffserver.regression
18 bf40937b Alex Beregszaszi
    WGET_OPTIONS="--user-agent=NSPlayer -q --proxy=off -e verbose=off -e server_response=off"
19 e2b2851e Philip Gladstone
    for file in $FILES; do
20 3d147064 Diego Biurrun
        if [ $(expr $file : "a-*") != 0 ]; then
21 fd83ad7f Baptiste Coudurier
            wget $WGET_OPTIONS -O - http://localhost:9999/$file > ff-$file
22 d746f928 Philip Gladstone
        else
23 fd83ad7f Baptiste Coudurier
            wget $WGET_OPTIONS -O - http://localhost:9999/$file?date=19700101T000000Z | dd bs=1 count=20000 > ff-$file 2>/dev/null
24 d746f928 Philip Gladstone
        fi
25 21f7ab7a Måns Rullgård
        do_md5sum ff-$file >>ffserver.regression
26 115329f1 Diego Biurrun
    done
27 e2b2851e Philip Gladstone
)
28
kill $FFSERVER_PID
29
wait > /dev/null 2>&1
30 4fbd52f0 Diego Biurrun
rm -f tests/feed1.ffm
31 21f7ab7a Måns Rullgård
if diff -u "$1" tests/data/ffserver.regression; then
32 115329f1 Diego Biurrun
    echo
33 e2b2851e Philip Gladstone
    echo Server regression test succeeded.
34
    exit 0
35
else
36 115329f1 Diego Biurrun
    echo
37 e2b2851e Philip Gladstone
    echo Server regression test: Error.
38
    exit 1
39
fi