2011-12-30 20:53:11 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Runs the autobahn websocket conformance test against tornado in both
|
|
|
|
# python2 and python3. Output goes in ./reports/servers/index.html.
|
|
|
|
#
|
|
|
|
# The --cases and --exclude arguments can be used to run only part of
|
2012-01-22 01:12:22 +00:00
|
|
|
# the suite. The default is --exclude="9.*" to skip the relatively slow
|
|
|
|
# performance tests; pass --exclude="" to override and include them.
|
2011-12-30 20:53:11 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# build/update the virtualenvs
|
|
|
|
tox
|
|
|
|
|
2011-12-30 22:47:21 +00:00
|
|
|
.tox/py25/bin/python server.py --port=9001 &
|
|
|
|
PY25_SERVER_PID=$!
|
|
|
|
|
|
|
|
.tox/py27/bin/python server.py --port=9002 &
|
2011-12-30 20:53:11 +00:00
|
|
|
PY27_SERVER_PID=$!
|
|
|
|
|
2011-12-30 22:47:21 +00:00
|
|
|
.tox/py32/bin/python server.py --port=9003 &
|
2011-12-30 20:53:11 +00:00
|
|
|
PY32_SERVER_PID=$!
|
|
|
|
|
2012-01-22 01:12:22 +00:00
|
|
|
.tox/pypy/bin/python server.py --port=9004 &
|
|
|
|
PYPY_SERVER_PID=$!
|
|
|
|
|
2011-12-30 20:53:11 +00:00
|
|
|
sleep 1
|
|
|
|
|
2012-01-22 01:12:22 +00:00
|
|
|
.tox/py27/bin/python ./client.py --servers=Tornado/py25=ws://localhost:9001,Tornado/py27=ws://localhost:9002,Tornado/py32=ws://localhost:9003,Tornado/pypy=ws://localhost:9004 "$@" || true
|
2011-12-30 20:53:11 +00:00
|
|
|
|
2011-12-30 22:47:21 +00:00
|
|
|
kill $PY25_SERVER_PID
|
2011-12-30 20:53:11 +00:00
|
|
|
kill $PY27_SERVER_PID
|
|
|
|
kill $PY32_SERVER_PID
|
2012-01-22 01:12:22 +00:00
|
|
|
kill $PYPY_SERVER_PID
|
2011-12-30 22:47:21 +00:00
|
|
|
wait
|
|
|
|
|
|
|
|
echo "Tests complete. Output is in ./reports/servers/index.html"
|