ClickHouse/docker/test/coverage/Dockerfile

37 lines
1.3 KiB
Docker
Raw Normal View History

2019-07-05 15:12:18 +00:00
# docker build -t yandex/clickhouse-coverage .
2019-07-08 11:09:46 +00:00
FROM yandex/clickhouse-deb-builder
2019-07-05 15:12:18 +00:00
RUN apt-get --allow-unauthenticated update -y \
&& env DEBIAN_FRONTEND=noninteractive \
apt-get --allow-unauthenticated install --yes --no-install-recommends \
bash \
fakeroot \
cmake \
ccache \
curl \
software-properties-common
2019-12-11 13:24:30 +00:00
RUN echo "deb [trusted=yes] http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main" >> /etc/apt/sources.list
2019-07-05 15:12:18 +00:00
RUN apt-get --allow-unauthenticated update -y \
&& env DEBIAN_FRONTEND=noninteractive \
apt-get --allow-unauthenticated install --yes --no-install-recommends \
perl \
lcov \
llvm-9 \
tzdata
ENV COVERAGE_DIR=/coverage_reports
ENV SOURCE_DIR=/build
ENV OUTPUT_DIR=/output
2019-07-05 15:18:48 +00:00
ENV IGNORE='.*contrib.*'
2019-07-05 15:12:18 +00:00
2019-12-11 13:24:30 +00:00
CMD mkdir -p /build/obj-x86_64-linux-gnu && cd /build/obj-x86_64-linux-gnu && CC=clang-8 CXX=clang++-8 cmake .. && cd /; \
2019-07-08 11:09:46 +00:00
dpkg -i /package_folder/clickhouse-common-static_*.deb; \
2019-07-05 15:12:18 +00:00
llvm-profdata-9 merge -sparse ${COVERAGE_DIR}/* -o clickhouse.profdata && \
llvm-cov-9 export /usr/bin/clickhouse -instr-profile=clickhouse.profdata -j=16 -format=lcov -skip-functions -ignore-filename-regex $IGNORE > output.lcov && \
genhtml output.lcov --ignore-errors source --output-directory ${OUTPUT_DIR}