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.

30 lines
712B

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