Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coverage #8142

Merged
merged 3 commits into from
Dec 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions docker/test/coverage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apt-get --allow-unauthenticated update -y \
software-properties-common


RUN echo "deb [trusted=yes] http://apt.llvm.org/bionic/ llvm-toolchain-bionic main" >> /etc/apt/sources.list
RUN echo "deb [trusted=yes] http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main" >> /etc/apt/sources.list

RUN apt-get --allow-unauthenticated update -y \
&& env DEBIAN_FRONTEND=noninteractive \
Expand All @@ -29,7 +29,7 @@ ENV OUTPUT_DIR=/output
ENV IGNORE='.*contrib.*'


CMD mkdir -p /build/obj-x86_64-linux-gnu && cd /build/obj-x86_64-linux-gnu && CC=clang-7 CXX=clang++-7 cmake .. && cd /; \
CMD mkdir -p /build/obj-x86_64-linux-gnu && cd /build/obj-x86_64-linux-gnu && CC=clang-8 CXX=clang++-8 cmake .. && cd /; \
dpkg -i /package_folder/clickhouse-common-static_*.deb; \
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 && \
Expand Down
16 changes: 11 additions & 5 deletions docker/test/stateful_with_coverage/run.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#!/bin/bash

kill_clickhouse () {
while kill -0 `pgrep -u clickhouse`;
kill `pgrep -u clickhouse` 2>/dev/null

for i in {1..10}
do
kill `pgrep -u clickhouse` 2>/dev/null
echo "Process" `pgrep -u clickhouse` "still alive"
sleep 10
if ! kill -0 `pgrep -u clickhouse`; then
echo "No clickhouse process"
break
else
echo "Process" `pgrep -u clickhouse` "still alive"
sleep 10
fi
done
}

Expand All @@ -16,7 +22,7 @@ start_clickhouse () {
wait_llvm_profdata () {
while kill -0 `pgrep llvm-profdata-9`;
do
echo "Waiting for profdata " `pgrep llvm-profdata-9` "still alive"
echo "Waiting for profdata" `pgrep llvm-profdata-9` "still alive"
sleep 3
done
}
Expand Down
16 changes: 11 additions & 5 deletions docker/test/stateless_with_coverage/run.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
#!/bin/bash

kill_clickhouse () {
while kill -0 `pgrep -u clickhouse`;
kill `pgrep -u clickhouse` 2>/dev/null

for i in {1..10}
do
kill `pgrep -u clickhouse` 2>/dev/null
echo "Process" `pgrep -u clickhouse` "still alive"
sleep 10
if ! kill -0 `pgrep -u clickhouse`; then
echo "No clickhouse process"
break
else
echo "Process" `pgrep -u clickhouse` "still alive"
sleep 10
fi
done
}

wait_llvm_profdata () {
while kill -0 `pgrep llvm-profdata-9`;
do
echo "Waiting for profdata " `pgrep llvm-profdata-9` "still alive"
echo "Waiting for profdata" `pgrep llvm-profdata-9` "still alive"
sleep 3
done
}
Expand Down