-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLASH-406] CI run gtest cases #163
[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
@@ -24,7 +24,7 @@ docker-compose down | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
/run-integration-tests |
dbms/CMakeLists.txt
Outdated
@@ -266,7 +266,8 @@ if (ENABLE_TESTS) | |||
|
|||
# attach all dbms gtest sources | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should name it gtests_dbms? The same as other unit_tests_*.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't actually need these ports and volumes for gtests, do we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh maybe we need log and config, I'm not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ports and some volumes are removed. Keep config files.
/run-integration-tests |
@zanmato1984 PTAL again |
/run-integration-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* [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-tests
will also run gtest. codeunit_tests_dbms
recursively glob all tests defined ingtest_*.cpp
underdbms/
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.txt
mark all tests binary asEXCLUDE_FROM_ALL
, so that we can ignore those binaries when runningmake all
TODO:
Tests define with independent main entrance can change to use gtest framework and be integrated to CI flow