Add package clickhouse-test, allow testing in pbuilder (#1709)

* Allow 32bit build (with warning)

* Add package clickhouse-test

* Test fixes

* fix

* fix

* clickhouse-test: aloow work in read-only queries dir (--tmp)

* Fix test
This commit is contained in:
proller 2017-12-27 22:01:57 +03:00 committed by alexey-milovidov
parent b79aa5db4e
commit f9d3c01a01
6 changed files with 31 additions and 5 deletions

View File

@ -216,8 +216,9 @@ endif ()
# also for copy_headers.sh:
target_include_directories (clickhouse_common_io BEFORE PRIVATE ${COMMON_INCLUDE_DIR})
add_subdirectory (tests)
if (ENABLE_TESTS)
add_subdirectory (tests)
# attach all dbms gtest sources
grep_gtest_sources(${ClickHouse_SOURCE_DIR}/dbms dbms_gtest_sources)
add_executable(unit_tests_dbms ${dbms_gtest_sources})

View File

@ -20,4 +20,14 @@ macro(grep_gtest_sources BASE_DIR DST_VAR)
file(GLOB_RECURSE "${DST_VAR}" RELATIVE "${BASE_DIR}" "gtest*.cpp")
endmacro()
install (PROGRAMS clickhouse-test DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clickhouse)
install (
DIRECTORY queries performance external_dictionaries
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/clickhouse-test
USE_SOURCE_PERMISSIONS
COMPONENT clickhouse
PATTERN "CMakeLists.txt" EXCLUDE
PATTERN ".gitignore" EXCLUDE
)
add_subdirectory (external_dictionaries)

View File

@ -1,6 +1,4 @@
/usr/bin/clickhouse-client
/usr/bin/clickhouse-benchmark
/usr/bin/clickhouse-local
/etc/clickhouse-client/config.xml
/usr/bin/clickhouse-extract-from-config
/usr/bin/clickhouse-performance-test

4
debian/clickhouse-test.install vendored Normal file
View File

@ -0,0 +1,4 @@
usr/bin/clickhouse-test
usr/share/clickhouse-test/*
usr/bin/clickhouse-performance-test
usr/bin/clickhouse-benchmark

8
debian/control vendored
View File

@ -53,3 +53,11 @@ Priority: extra
Depends: ${misc:Depends}, clickhouse-server-base (= ${binary:Version})
Description: debugging symbols for clickhouse-server-base
This package contains the debugging symbols for clickhouse-server-base.
Package: clickhouse-test
Section: Database
Priority: extra
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, clickhouse-client, clickhouse-compressor, bash, expect, python, python-lxml, python-termcolor, curl, perl, sudo
Description: Clickhouse tests

View File

@ -1,4 +1,9 @@
#!/bin/bash
#service clickhouse-server start
clickhouse-client -q "SELECT version();"
# delete me:
env
clickhouse-client -q "SELECT * from system.build_options;"
# --no-shard because default server listen only :: and 127.0.0.1
[ -n "$TEST_RUN" ] && clickhouse-test --no-shard --queries /usr/share/clickhouse-test/queries || true