From 86ddb5393d452fc30ba3941a286c79c253909abc Mon Sep 17 00:00:00 2001 From: Noah Eisen Date: Tue, 16 Jan 2018 18:13:26 -0800 Subject: [PATCH] Ensure all sanity finds clang-tidy --- templates/tools/dockerfile/clang5.include | 4 ++++ .../tools/dockerfile/grpc_clang_format/Dockerfile.template | 2 -- .../tools/dockerfile/grpc_clang_tidy/Dockerfile.template | 2 -- templates/tools/dockerfile/test/sanity/Dockerfile.template | 2 -- tools/dockerfile/grpc_clang_format/Dockerfile | 4 +++- tools/dockerfile/grpc_clang_tidy/Dockerfile | 6 ++++-- tools/dockerfile/test/sanity/Dockerfile | 4 +++- 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/templates/tools/dockerfile/clang5.include b/templates/tools/dockerfile/clang5.include index f16439b1d45..11ff4427879 100644 --- a/templates/tools/dockerfile/clang5.include +++ b/templates/tools/dockerfile/clang5.include @@ -1,3 +1,7 @@ RUN apt-get update && apt-get -y install wget xz-utils RUN wget http://releases.llvm.org/5.0.0/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04.tar.xz RUN tar xf clang+llvm-5.0.0-linux-x86_64-ubuntu14.04.tar.xz +RUN ln -s /clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/clang-format /usr/local/bin/clang-format +ENV CLANG_FORMAT=clang-format +RUN ln -s /clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/clang-tidy /usr/local/bin/clang-tidy +ENV CLANG_TIDY=clang-tidy diff --git a/templates/tools/dockerfile/grpc_clang_format/Dockerfile.template b/templates/tools/dockerfile/grpc_clang_format/Dockerfile.template index 75048ba70fe..4f24a025c64 100644 --- a/templates/tools/dockerfile/grpc_clang_format/Dockerfile.template +++ b/templates/tools/dockerfile/grpc_clang_format/Dockerfile.template @@ -17,8 +17,6 @@ FROM debian:jessie <%include file="../clang5.include"/> - RUN ln -s /clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/clang-format /usr/local/bin/clang-format - ENV CLANG_FORMAT=clang-format ADD clang_format_all_the_things.sh / CMD ["echo 'Run with tools/distrib/clang_format_code.sh'"] diff --git a/templates/tools/dockerfile/grpc_clang_tidy/Dockerfile.template b/templates/tools/dockerfile/grpc_clang_tidy/Dockerfile.template index 67d56cace22..f5bceaa5f38 100644 --- a/templates/tools/dockerfile/grpc_clang_tidy/Dockerfile.template +++ b/templates/tools/dockerfile/grpc_clang_tidy/Dockerfile.template @@ -18,8 +18,6 @@ <%include file="../clang5.include"/> <%include file="../python_deps.include"/> - RUN ln -s /clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/clang-tidy /usr/local/bin/clang-tidy - ENV CLANG_TIDY=clang-tidy ADD clang_tidy_all_the_things.sh / CMD ["echo 'Run with tools/distrib/clang_tidy_code.sh'"] diff --git a/templates/tools/dockerfile/test/sanity/Dockerfile.template b/templates/tools/dockerfile/test/sanity/Dockerfile.template index 9caa10884dc..7453e6c460d 100644 --- a/templates/tools/dockerfile/test/sanity/Dockerfile.template +++ b/templates/tools/dockerfile/test/sanity/Dockerfile.template @@ -54,8 +54,6 @@ RUN ./bazel-0.4.4-installer-linux-x86_64.sh <%include file="../../clang5.include"/> - RUN ln -s /clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/clang-format /usr/local/bin/clang-format - ENV CLANG_FORMAT=clang-format <%include file="../../run_tests_addons.include"/> # Define the default command. diff --git a/tools/dockerfile/grpc_clang_format/Dockerfile b/tools/dockerfile/grpc_clang_format/Dockerfile index 7c2b5650f64..8801315bc9b 100644 --- a/tools/dockerfile/grpc_clang_format/Dockerfile +++ b/tools/dockerfile/grpc_clang_format/Dockerfile @@ -17,8 +17,10 @@ FROM debian:jessie RUN apt-get update && apt-get -y install wget xz-utils RUN wget http://releases.llvm.org/5.0.0/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04.tar.xz RUN tar xf clang+llvm-5.0.0-linux-x86_64-ubuntu14.04.tar.xz - RUN ln -s /clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/clang-format /usr/local/bin/clang-format ENV CLANG_FORMAT=clang-format +RUN ln -s /clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/clang-tidy /usr/local/bin/clang-tidy +ENV CLANG_TIDY=clang-tidy + ADD clang_format_all_the_things.sh / CMD ["echo 'Run with tools/distrib/clang_format_code.sh'"] diff --git a/tools/dockerfile/grpc_clang_tidy/Dockerfile b/tools/dockerfile/grpc_clang_tidy/Dockerfile index ed34fdc107f..9d9d70185b0 100644 --- a/tools/dockerfile/grpc_clang_tidy/Dockerfile +++ b/tools/dockerfile/grpc_clang_tidy/Dockerfile @@ -17,6 +17,10 @@ FROM debian:jessie RUN apt-get update && apt-get -y install wget xz-utils RUN wget http://releases.llvm.org/5.0.0/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04.tar.xz RUN tar xf clang+llvm-5.0.0-linux-x86_64-ubuntu14.04.tar.xz +RUN ln -s /clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/clang-format /usr/local/bin/clang-format +ENV CLANG_FORMAT=clang-format +RUN ln -s /clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/clang-tidy /usr/local/bin/clang-tidy +ENV CLANG_TIDY=clang-tidy #==================== # Python dependencies @@ -33,7 +37,5 @@ RUN pip install --upgrade pip==9.0.1 RUN pip install virtualenv RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.0.post1 six==1.10.0 twisted==17.5.0 -RUN ln -s /clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/clang-tidy /usr/local/bin/clang-tidy -ENV CLANG_TIDY=clang-tidy ADD clang_tidy_all_the_things.sh / CMD ["echo 'Run with tools/distrib/clang_tidy_code.sh'"] diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile index a243cbb8e51..7a8e1c09b1d 100644 --- a/tools/dockerfile/test/sanity/Dockerfile +++ b/tools/dockerfile/test/sanity/Dockerfile @@ -108,9 +108,11 @@ RUN ./bazel-0.4.4-installer-linux-x86_64.sh RUN apt-get update && apt-get -y install wget xz-utils RUN wget http://releases.llvm.org/5.0.0/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04.tar.xz RUN tar xf clang+llvm-5.0.0-linux-x86_64-ubuntu14.04.tar.xz - RUN ln -s /clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/clang-format /usr/local/bin/clang-format ENV CLANG_FORMAT=clang-format +RUN ln -s /clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin/clang-tidy /usr/local/bin/clang-tidy +ENV CLANG_TIDY=clang-tidy + # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc RUN ln -s /usr/bin/ccache /usr/local/bin/g++