Statistics
| Branch: | Revision:

ffmpeg / tests / ffserver-regression.sh @ c676895f

History | View | Annotate | Download (1.37 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 66d23c96 Diego Biurrun
. $(dirname $0)/regression-funcs.sh
7
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 d746f928 Philip Gladstone
    rm -f ff-*;
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
        MDFILES="$MDFILES ff-$file"
26 115329f1 Diego Biurrun
    done
27 e2b2851e Philip Gladstone
    wait
28
    # the status page is always different
29 66d23c96 Diego Biurrun
    do_md5sum $MDFILES > ffserver.regression
30 e2b2851e Philip Gladstone
)
31
kill $FFSERVER_PID
32
wait > /dev/null 2>&1
33 4fbd52f0 Diego Biurrun
rm -f tests/feed1.ffm
34 989bbe62 Diego Biurrun
if diff -u tests/data/ffserver.regression "$1" ; then
35 115329f1 Diego Biurrun
    echo
36 e2b2851e Philip Gladstone
    echo Server regression test succeeded.
37
    exit 0
38
else
39 115329f1 Diego Biurrun
    echo
40 e2b2851e Philip Gladstone
    echo Server regression test: Error.
41
    exit 1
42
fi