mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
parent
5209615cf6
commit
f6f505ea33
@ -25,12 +25,6 @@ add_subdirectory (external_dictionaries)
|
|||||||
if (ENABLE_TESTS)
|
if (ENABLE_TESTS)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_BINARY_DIR})
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_BINARY_DIR})
|
||||||
|
|
||||||
if ($ENV{TEST_OPT})
|
|
||||||
set(TEST_OPT $ENV{TEST_OPT})
|
|
||||||
else ()
|
|
||||||
set(TEST_OPT "--skip compile")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# maybe add --no-long ?
|
# maybe add --no-long ?
|
||||||
add_test(NAME with_server COMMAND bash -c "env BUILD_DIR=${ClickHouse_BINARY_DIR} TEST_OPT='${TEST_OPT}' ${CMAKE_CURRENT_SOURCE_DIR}/clickhouse-test-server")
|
add_test(NAME with_server COMMAND bash -c "env BUILD_DIR=${ClickHouse_BINARY_DIR} TEST_OPT0='--skip compile' ${CMAKE_CURRENT_SOURCE_DIR}/clickhouse-test-server")
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -64,5 +64,5 @@ if [ -n "$*" ]; then
|
|||||||
else
|
else
|
||||||
${BIN_DIR}clickhouse-client --config ${CONFIG_CLIENT} -q 'SELECT * from system.build_options;'
|
${BIN_DIR}clickhouse-client --config ${CONFIG_CLIENT} -q 'SELECT * from system.build_options;'
|
||||||
PATH=$PATH:$BIN_DIR \
|
PATH=$PATH:$BIN_DIR \
|
||||||
${TEST_DIR}clickhouse-test --binary ${BIN_DIR}clickhouse --configclient ${CONFIG_CLIENT} --configserver ${CLICKHOUSE_CONFIG} --tmp $DATA_DIR/tmp --queries ${QUERIES_DIR} $TEST_OPT
|
${TEST_DIR}clickhouse-test --binary ${BIN_DIR}clickhouse --configclient ${CONFIG_CLIENT} --configserver ${CLICKHOUSE_CONFIG} --tmp $DATA_DIR/tmp --queries ${QUERIES_DIR} $TEST_OPT0 $TEST_OPT
|
||||||
fi
|
fi
|
||||||
|
16
debian/pbuilder-hooks/B90test-server
vendored
16
debian/pbuilder-hooks/B90test-server
vendored
@ -18,6 +18,9 @@ dpkg-reconfigure -f noninteractive tzdata
|
|||||||
|
|
||||||
mkdir -p /etc/clickhouse-server/config.d /etc/clickhouse-client/config.d
|
mkdir -p /etc/clickhouse-server/config.d /etc/clickhouse-client/config.d
|
||||||
|
|
||||||
|
TEST_CONNECT=${TEST_CONNECT=1}
|
||||||
|
if [ "${TEST_CONNECT}" ]; then
|
||||||
|
|
||||||
TEST_SSL=${TEST_SSL=1}
|
TEST_SSL=${TEST_SSL=1}
|
||||||
if [ "${TEST_SSL}" ]; then
|
if [ "${TEST_SSL}" ]; then
|
||||||
echo "<yandex><https_port>8443</https_port><tcp_ssl_port>9440</tcp_ssl_port></yandex>" > /etc/clickhouse-server/config.d/ssl.xml
|
echo "<yandex><https_port>8443</https_port><tcp_ssl_port>9440</tcp_ssl_port></yandex>" > /etc/clickhouse-server/config.d/ssl.xml
|
||||||
@ -25,8 +28,17 @@ if [ "${TEST_SSL}" ]; then
|
|||||||
|
|
||||||
openssl dhparam -out /etc/clickhouse-server/dhparam.pem 256
|
openssl dhparam -out /etc/clickhouse-server/dhparam.pem 256
|
||||||
openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/clickhouse-server/server.key -out /etc/clickhouse-server/server.crt
|
openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/clickhouse-server/server.key -out /etc/clickhouse-server/server.crt
|
||||||
|
CLIENT_ADD="--ssl"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
function finish {
|
||||||
|
service clickhouse-server stop
|
||||||
|
tail -n 100 /var/log/clickhouse-server/*
|
||||||
|
sleep 1
|
||||||
|
killall -9 clickhouse-server || true
|
||||||
|
}
|
||||||
|
trap finish EXIT SIGINT SIGQUIT SIGTERM
|
||||||
|
|
||||||
service clickhouse-server start
|
service clickhouse-server start
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
@ -36,11 +48,11 @@ tail -n100 /var/log/clickhouse-server/*
|
|||||||
clickhouse-client -q "SELECT * from system.build_options;"
|
clickhouse-client -q "SELECT * from system.build_options;"
|
||||||
clickhouse-client ${CLIENT_ADD} -q "SELECT toDateTime(1);"
|
clickhouse-client ${CLIENT_ADD} -q "SELECT toDateTime(1);"
|
||||||
|
|
||||||
|
|
||||||
( [ "${TEST_RUN}" ] && clickhouse-test --queries /usr/share/clickhouse-test/queries --tmp /tmp/clickhouse-test/ ${TEST_OPT} ) || ${TEST_TRUE:=true}
|
( [ "${TEST_RUN}" ] && clickhouse-test --queries /usr/share/clickhouse-test/queries --tmp /tmp/clickhouse-test/ ${TEST_OPT} ) || ${TEST_TRUE:=true}
|
||||||
|
|
||||||
|
|
||||||
service clickhouse-server stop
|
service clickhouse-server stop
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
# Test debug symbols
|
# Test debug symbols
|
||||||
# gdb -ex quit --args /usr/bin/clickhouse-server
|
# gdb -ex quit --args /usr/bin/clickhouse-server
|
||||||
|
Loading…
Reference in New Issue
Block a user