Index: third_party/grpc/tools/run_tests/build_python.sh |
diff --git a/third_party/WebKit/LayoutTests/http/tests/websocket/close_wsh.py b/third_party/grpc/tools/run_tests/build_python.sh |
old mode 100644 |
new mode 100755 |
similarity index 68% |
copy from third_party/WebKit/LayoutTests/http/tests/websocket/close_wsh.py |
copy to third_party/grpc/tools/run_tests/build_python.sh |
index 1b02d66267e294ce83977dac64f075981705647c..79a148faf1bfcf215330e2f42519a365de46d95b |
--- a/third_party/WebKit/LayoutTests/http/tests/websocket/close_wsh.py |
+++ b/third_party/grpc/tools/run_tests/build_python.sh |
@@ -1,4 +1,5 @@ |
-# Copyright 2011, Google Inc. |
+#!/bin/bash |
+# Copyright 2015-2016, Google Inc. |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
@@ -27,27 +28,27 @@ |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+set -ex |
-import logging |
-_GOODBYE_MESSAGE = u'Goodbye' |
+# change to grpc repo root |
+cd $(dirname $0)/../.. |
+ROOT=`pwd` |
+export LD_LIBRARY_PATH=$ROOT/libs/$CONFIG |
+export DYLD_LIBRARY_PATH=$ROOT/libs/$CONFIG |
+export PATH=$ROOT/bins/$CONFIG:$ROOT/bins/$CONFIG/protobuf:$PATH |
+export CFLAGS="-I$ROOT/include -std=gnu99" |
+export LDFLAGS="-L$ROOT/libs/$CONFIG" |
+export GRPC_PYTHON_BUILD_WITH_CYTHON=1 |
-def web_socket_do_extra_handshake(request): |
- pass # Always accept. |
+if [ "$CONFIG" = "gcov" ] |
+then |
+ export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1 |
+fi |
+tox --notest |
-def web_socket_transfer_data(request): |
- while True: |
- line = request.ws_stream.receive_message() |
- if line is None: |
- return |
- if isinstance(line, unicode): |
- request.ws_stream.send_message(line, binary=False) |
- if line == _GOODBYE_MESSAGE: |
- return |
- else: |
- request.ws_stream.send_message(line, binary=True) |
- |
- |
-def web_socket_passive_closing_handshake(request): |
- return request.ws_close_code, request.ws_close_reason |
+$ROOT/.tox/py27/bin/python $ROOT/setup.py build |
+$ROOT/.tox/py27/bin/python $ROOT/setup.py build_py |
+$ROOT/.tox/py27/bin/python $ROOT/setup.py build_ext --inplace |
+$ROOT/.tox/py27/bin/python $ROOT/setup.py gather --test |