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.

29 lines
694B

  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. for file in $FILES; do
  10. wget --user-agent=NSPlayer -q --output-document=- http://localhost:9999/$file?date=19700101T000000Z | head --bytes=100000 > $file &
  11. done
  12. wait
  13. # the status page is always different
  14. md5sum $FILES | grep -v html > ffserver.regression
  15. )
  16. kill $FFSERVER_PID
  17. wait > /dev/null 2>&1
  18. if diff -u data/ffserver.regression $1 ; then
  19. echo
  20. echo Server regression test succeeded.
  21. exit 0
  22. else
  23. echo
  24. echo Server regression test: Error.
  25. exit 1
  26. fi