ClickHouse/docker/test/sqltest/run.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.2 KiB
Bash
Raw Normal View History

2023-07-19 01:42:32 +00:00
#!/bin/bash
2023-07-20 02:50:12 +00:00
# shellcheck disable=SC2015
2023-07-19 01:42:32 +00:00
set -x
set -e
set -u
set -o pipefail
BINARY_TO_DOWNLOAD=${BINARY_TO_DOWNLOAD:="clang-17_debug_none_unsplitted_disable_False_binary"}
2023-07-19 01:42:32 +00:00
BINARY_URL_TO_DOWNLOAD=${BINARY_URL_TO_DOWNLOAD:="https://clickhouse-builds.s3.amazonaws.com/$PR_TO_TEST/$SHA_TO_TEST/clickhouse_build_check/$BINARY_TO_DOWNLOAD/clickhouse"}
function wget_with_retry
{
for _ in 1 2 3 4; do
if wget -nv -nd -c "$1";then
return 0
else
sleep 0.5
fi
done
return 1
}
wget_with_retry "$BINARY_URL_TO_DOWNLOAD"
chmod +x clickhouse
./clickhouse install --noninteractive
2023-07-19 02:01:00 +00:00
echo "
users:
default:
access_management: 1" > /etc/clickhouse-server/users.d/access_management.yaml
2023-07-19 01:42:32 +00:00
clickhouse start
# Wait for start
for _ in {1..100}
do
clickhouse-client --query "SELECT 1" && break ||:
sleep 1
done
# Run the test
pushd sqltest/standards/2016/
2023-07-19 01:47:41 +00:00
/test.py
2023-08-03 13:28:18 +00:00
mv report.html test.log /workspace
2023-07-19 01:42:32 +00:00
popd
zstd --threads=0 /var/log/clickhouse-server/clickhouse-server.log
zstd --threads=0 /var/log/clickhouse-server/clickhouse-server.err.log
2023-08-03 13:28:18 +00:00
mv /var/log/clickhouse-server/clickhouse-server.log.zst /var/log/clickhouse-server/clickhouse-server.err.log.zst /workspace