2
# Even in the 21st century some diffs are not supporting -u.
3
diff -u $0 $0 > /dev/null 2>&1
10
# Make sure that the data directory exists
13
cp "$2" data/test.conf
14
#perl -e 'chomp($wd = `pwd`); print map { s!data/!!; "<Stream $_>\nFile $wd/data/$_\n</Stream>\n\n" } @ARGV' data/a* >> data/test.conf
15
#perl -e 'chomp($wd = `pwd`); print map { s!data/!!; "<Stream $_.asf>\nFile $wd/data/$_\n</Stream>\n\n" } @ARGV' data/a* >> data/test.conf
17
FILES=`perl -n -e 'print \$1, "\n" if /<stream\\s+(\\S+)>/i' data/test.conf | sort`
20
../ffserver -d -f data/test.conf 2> /dev/null &
22
echo "Waiting for feeds to startup..."
27
WGET_OPTIONS="--user-agent=NSPlayer -q --proxy=off -e verbose=off -e debug=off -e server_response=off"
28
for file in $FILES; do
29
if [ `expr match $file "a-*"` -ne 0 ]; then
30
wget $WGET_OPTIONS --output-document=- http://localhost:9999/$file > ff-$file &
32
wget $WGET_OPTIONS --output-document=- http://localhost:9999/$file?date=19700101T000000Z | dd bs=1 count=100000 > ff-$file 2>/dev/null &
34
MDFILES="$MDFILES ff-$file"
37
# the status page is always different
38
md5sum $MDFILES | grep -v html > ffserver.regression
42
if $diff_cmd data/ffserver.regression $1 ; then
44
echo Server regression test succeeded.
48
echo Server regression test: Error.