[FLASH-406] CI run gtest cases#163
Conversation
|
/run-integration-tests |
|
Seems cmake has EXCLUDE_FROM_ALL option for add_subdirectory command (https://cmake.org/cmake/help/v3.0/command/add_subdirectory.html), so we'll be able to specify EXCLUDE_FROM_ALL when adding |
2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh
Good idea, I will change it |
tests/docker/run.sh
Outdated
| docker-compose up -d --scale tiflash0=0 --scale tikv-learner0=0 --scale tikv0=0 --scale tidb0=0 --scale pd0=0 | ||
|
|
||
| docker-compose exec -T tics0 bash -c 'cd /tests ; ./run-test.sh mutable-test' | ||
| docker-compose exec -T tics0 bash -c 'cd /tests ; ./run-test.sh mutable-test && ./run-gtest.sh ' |
There was a problem hiding this comment.
Do our gtests rely on a running server? If not, I'd suggest shutting down all docker services and start a new container of tics with hijacked entry command (the one that runs our gtests).
|
/run-integration-tests |
dbms/CMakeLists.txt
Outdated
| grep_gtest_sources(${ClickHouse_SOURCE_DIR}/dbms dbms_gtest_sources) | ||
| add_executable(unit_tests_dbms ${dbms_gtest_sources}) | ||
| target_link_libraries(unit_tests_dbms gtest_main dbms) | ||
| add_executable(unit_tests_dbms EXCLUDE_FROM_ALL ${dbms_gtest_sources}) |
There was a problem hiding this comment.
I think we should name it gtests_dbms? The same as other unit_tests_*.
There was a problem hiding this comment.
These name is defined in Clickhouse, and I just use them...
Agree that gtest_* is more easy to understand, changes done.
tests/docker/docker-compose.yaml
Outdated
| # tics-gtest container is for gtests cases | ||
| tics-gtest: | ||
| image: hub.pingcap.net/tiflash/tics:${TAG:-master} | ||
| ports: |
There was a problem hiding this comment.
We don't actually need these ports and volumes for gtests, do we?
There was a problem hiding this comment.
Oh maybe we need log and config, I'm not sure.
There was a problem hiding this comment.
Ports and some volumes are removed. Keep config files.
|
/run-integration-tests |
|
@zanmato1984 PTAL again |
|
/run-integration-tests |
* [flash-365] support db filters * format * address comments. * pass tests * change config file * change config again * address comment
2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh
…g/tics into ci-run-gtest-cases-to-master
|
/run-integration-tests |
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
* ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh * ci run unittests defined using gtest * fix bug in CMakeLists * 1. disable zookeeper test cases 2. use template struct SchemaBuilder instead of template class 3. more portable run-gtest.sh * use EXCLUDE_FROM_ALL in add_subdirectory instead of add_executable * new container of tics just for gtest * disable tics-gtest in unused command * address comment * address comment * add continue_on_error option in run-gtest.sh
Changes:
/run-integration-testswill also run gtest. codeunit_tests_dbmsrecursively glob all tests defined ingtest_*.cppunderdbms/defined at dbms/CMakeLists.txt . Binary size is about 240 MB.unit_tests_libcommon. Binary size is about 4 MB defined at libs/libcommon/src/tests/CMakeLists.txt*/CMakeLists.txtmark all tests binary asEXCLUDE_FROM_ALL, so that we can ignore those binaries when runningmake allTODO:
Tests define with independent main entrance can change to use gtest framework and be integrated to CI flow