Index: third_party/grpc/tools/distrib/clang_format_code.sh |
diff --git a/third_party/WebKit/LayoutTests/http/tests/websocket/workers/resources/echo_wsh.py b/third_party/grpc/tools/distrib/clang_format_code.sh |
old mode 100644 |
new mode 100755 |
similarity index 78% |
copy from third_party/WebKit/LayoutTests/http/tests/websocket/workers/resources/echo_wsh.py |
copy to third_party/grpc/tools/distrib/clang_format_code.sh |
index 429f58186e3fce43dc21e81e0f9d7e20c7e0bf70..d904a841d4eadef54fbe52e12c338e5d1eb18cd5 |
--- a/third_party/WebKit/LayoutTests/http/tests/websocket/workers/resources/echo_wsh.py |
+++ b/third_party/grpc/tools/distrib/clang_format_code.sh |
@@ -1,4 +1,5 @@ |
-# Copyright 2010, Google Inc. |
+#!/bin/bash |
+# Copyright 2015-2016, Google Inc. |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
@@ -27,20 +28,13 @@ |
# (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 |
-from mod_pywebsocket import msgutil |
+# change to root directory |
+cd $(dirname $0)/../.. |
+# build clang-format docker image |
+docker build -t grpc_clang_format tools/dockerfile/grpc_clang_format |
-_GOODBYE_MESSAGE = 'Goodbye' |
- |
- |
-def web_socket_do_extra_handshake(request): |
- pass # Always accept. |
- |
- |
-def web_socket_transfer_data(request): |
- while True: |
- line = msgutil.receive_message(request) |
- msgutil.send_message(request, line) |
- if line == _GOODBYE_MESSAGE: |
- return |
+# run clang-format against the checked out codebase |
+docker run -e TEST=$TEST -e CHANGED_FILES="$CHANGED_FILES" --rm=true -v ${HOST_GIT_ROOT:-`pwd`}:/local-code -t grpc_clang_format /clang_format_all_the_things.sh |