Skip to content
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

Merged

Conversation

JaySon-Huang
Copy link
Contributor

@JaySon-Huang JaySon-Huang commented Aug 7, 2019

Changes:

  • Comment in PR with /run-integration-tests will also run gtest. code

TODO:
Tests define with independent main entrance can change to use gtest framework and be integrated to CI flow

@JaySon-Huang
Copy link
Contributor Author

/run-integration-tests

@zanmato1984
Copy link
Contributor

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 tests subdirectories and no need to specify for each individual test?

2. use template struct SchemaBuilder instead of template class
3. more portable run-gtest.sh
@JaySon-Huang
Copy link
Contributor Author

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 tests subdirectories and no need to specify for each individual test?

Good idea, I will change it

@@ -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 '
Copy link
Contributor

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@JaySon-Huang
Copy link
Contributor Author

/run-integration-tests

@@ -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})
Copy link
Contributor

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_*.

Copy link
Contributor Author

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.

# tics-gtest container is for gtests cases
tics-gtest:
image: hub.pingcap.net/tiflash/tics:${TAG:-master}
ports:
Copy link
Contributor

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?

Copy link
Contributor

@zanmato1984 zanmato1984 Aug 7, 2019

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.

Copy link
Contributor Author

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.

@JaySon-Huang
Copy link
Contributor Author

/run-integration-tests

@JaySon-Huang
Copy link
Contributor Author

@zanmato1984 PTAL again

@JaySon-Huang
Copy link
Contributor Author

/run-integration-tests

Copy link
Contributor

@zanmato1984 zanmato1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

hanfei1991 and others added 8 commits August 8, 2019 13:46
* [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
@JaySon-Huang JaySon-Huang changed the title CI run gtest cases [FLASH-406] CI run gtest cases Aug 8, 2019
@JaySon-Huang
Copy link
Contributor Author

/run-integration-tests

@JaySon-Huang JaySon-Huang merged commit c1c75da into pingcap:master Aug 8, 2019
@zanmato1984 zanmato1984 deleted the ci-run-gtest-cases-to-master branch August 8, 2019 07:28
JaySon-Huang added a commit to JaySon-Huang/tiflash that referenced this pull request Aug 8, 2019
* 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
JaySon-Huang added a commit to JaySon-Huang/tiflash that referenced this pull request Aug 26, 2019
* 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
JaySon-Huang added a commit to JaySon-Huang/tiflash that referenced this pull request Sep 5, 2019
* 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
JaySon-Huang added a commit to JaySon-Huang/tiflash that referenced this pull request Sep 12, 2019
* 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
JaySon-Huang added a commit to JaySon-Huang/tiflash that referenced this pull request Sep 18, 2019
* 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
JaySon-Huang added a commit to JaySon-Huang/tiflash that referenced this pull request Sep 23, 2019
* 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
JaySon-Huang added a commit that referenced this pull request Sep 26, 2019
* 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
JaySon-Huang added a commit to JaySon-Huang/tiflash that referenced this pull request Oct 17, 2019
* 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
JaySon-Huang added a commit to JaySon-Huang/tiflash that referenced this pull request Oct 18, 2019
* 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
JaySon-Huang added a commit that referenced this pull request Oct 22, 2019
* 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
JaySon-Huang added a commit to JaySon-Huang/tiflash that referenced this pull request Oct 23, 2019
* 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
JaySon-Huang added a commit to JaySon-Huang/tiflash that referenced this pull request Oct 30, 2019
* 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
JaySon-Huang added a commit to JaySon-Huang/tiflash that referenced this pull request Nov 1, 2019
* 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
JaySon-Huang added a commit to JaySon-Huang/tiflash that referenced this pull request Nov 1, 2019
* 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
JaySon-Huang added a commit to JaySon-Huang/tiflash that referenced this pull request Nov 5, 2019
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants