You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
787B

  1. #!/bin/bash
  2. FILES=`perl -n -e 'print \$1, " " if /<stream\\s+(\\S+)>/i' test.conf`
  3. rm -f /tmp/feed.ffm
  4. ../ffserver -d -f test.conf 2> /dev/null &
  5. FFSERVER_PID=$!
  6. sleep 1
  7. (
  8. cd data
  9. rm -f $FILES;
  10. for file in $FILES; do
  11. wget --user-agent=NSPlayer -q --proxy=off -e verbose=off -e debug=off -e server_response=off \
  12. --output-document=- http://localhost:9999/$file?date=19700101T000000Z | head --bytes=100000 > $file &
  13. done
  14. wait
  15. # the status page is always different
  16. md5sum $FILES | grep -v html > ffserver.regression
  17. )
  18. kill $FFSERVER_PID
  19. wait > /dev/null 2>&1
  20. if diff -u data/ffserver.regression $1 ; then
  21. echo
  22. echo Server regression test succeeded.
  23. exit 0
  24. else
  25. echo
  26. echo Server regression test: Error.
  27. exit 1
  28. fi