diff options
-rw-r--r-- | test/core/end2end/end2end_tests.c | 2 | ||||
-rwxr-xr-x | tools/distrib/clang_format_code.sh | 4 | ||||
-rwxr-xr-x | tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh | 14 | ||||
-rwxr-xr-x | tools/jenkins/build_docker_and_run_tests.sh | 3 |
4 files changed, 17 insertions, 6 deletions
diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c index 4c3a018ad2..7797ac25c0 100644 --- a/test/core/end2end/end2end_tests.c +++ b/test/core/end2end/end2end_tests.c @@ -2,7 +2,7 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/tools/distrib/clang_format_code.sh b/tools/distrib/clang_format_code.sh index bc913cb6c1..612074acdf 100755 --- a/tools/distrib/clang_format_code.sh +++ b/tools/distrib/clang_format_code.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -37,5 +37,5 @@ cd $(dirname $0)/../.. docker build -t grpc_clang_format tools/dockerfile/grpc_clang_format # run clang-format against the checked out codebase -docker run -e TEST=$TEST --rm=true -v `pwd`:/local-code -t grpc_clang_format /clang_format_all_the_things.sh +docker run -e TEST=$TEST --rm=true -v ${HOST_GIT_ROOT:-`pwd`}:/local-code -t grpc_clang_format /clang_format_all_the_things.sh diff --git a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh index 60fd30cd6f..ededc6e809 100755 --- a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh +++ b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -28,6 +28,8 @@ # (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 -e + # directories to run against DIRS="src/core src/cpp test/core test/cpp include" @@ -50,9 +52,17 @@ if [ "x$TEST" = "x" ] then echo $files | xargs $CLANG_FORMAT -i else + ok=yes for file in $files do - $CLANG_FORMAT $file | diff $file - + tmp=`mktemp` + $CLANG_FORMAT $file > $tmp + diff -u $file $tmp || ok=no + rm $tmp done + if [ $ok == no ] + then + false + fi fi diff --git a/tools/jenkins/build_docker_and_run_tests.sh b/tools/jenkins/build_docker_and_run_tests.sh index 4ab9909f9f..b911317558 100755 --- a/tools/jenkins/build_docker_and_run_tests.sh +++ b/tools/jenkins/build_docker_and_run_tests.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -64,6 +64,7 @@ docker run \ -e CCACHE_DIR=/tmp/ccache \ -e XDG_CACHE_HOME=/tmp/xdg-cache-home \ -e THIS_IS_REALLY_NEEDED='see https://github.com/docker/docker/issues/14203 for why docker is awful' \ + -e HOST_GIT_ROOT=$git_root \ -i $TTY_FLAG \ -v "$git_root:/var/local/jenkins/grpc" \ -v /tmp/ccache:/tmp/ccache \ |