2019-09-23 13:19:55 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
|
|
|
install_and_run_server() {
|
2019-09-23 15:57:18 +00:00
|
|
|
mkdir /unpacked
|
|
|
|
tar -xzf /package_folder/shared_build.tgz -C /unpacked --strip 1
|
2021-02-26 22:20:49 +00:00
|
|
|
LD_LIBRARY_PATH=/unpacked /unpacked/clickhouse-server --config /unpacked/config/config.xml >/test_output/stderr.log 2>&1 &
|
2019-09-23 13:19:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
run_client() {
|
2020-05-11 17:32:26 +00:00
|
|
|
for i in {1..100}; do
|
|
|
|
sleep 1
|
2021-02-26 22:20:49 +00:00
|
|
|
LD_LIBRARY_PATH=/unpacked /unpacked/clickhouse-client --query "select 'OK'" > /test_output/run.log 2> /test_output/clientstderr.log && break
|
2020-05-11 17:32:26 +00:00
|
|
|
[[ $i == 100 ]] && echo 'FAIL'
|
|
|
|
done
|
2019-09-23 13:19:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
install_and_run_server
|
|
|
|
run_client
|
2021-02-26 22:20:49 +00:00
|
|
|
mv /var/log/clickhouse-server/clickhouse-server.log /test_output/clickhouse-server.log
|
2021-02-26 12:58:13 +00:00
|
|
|
/process_split_build_smoke_test_result.py || echo -e "failure\tCannot parse results" > /test_output/check_status.tsv
|