-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Enable googletest for test utils #1738
Conversation
This should fix |
@@ -312,7 +312,9 @@ endif() | |||
# Benchmarks and tests at some places are coupled which is not great. See | |||
# velox/vector/CMakeLists.txt. TODO: Decouple. | |||
set(VELOX_DISABLE_GOOGLETEST OFF) | |||
if(NOT VELOX_BUILD_TESTING AND NOT VELOX_ENABLE_BENCHMARKS_BASIC) | |||
if(NOT VELOX_BUILD_TEST_UTILS |
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.
There might be other projects of which Velox is a submodule and it seems unnecessary to build test utils etc when you just need gtest as a dependency. How about we have another flag say VELOX_LINK_GTEST which if set wont trigger the section below. It also makes it evident why its set.
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.
Each project should ideally have its own GTest dependency and should not depend on Velox for GTest. But unfortunately, GTest is coupled with Velox in strange ways, which is causing all these issues.
This PR is a temporary fix for presto_cpp. We should fix Velox and have presto_cpp vendor its own GTest.
If there are other projects in a similar situation, we should do as you suggested.
Add a flag VELOX_VENDOR_GTEST
and enable GTest. What do you think?
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.
Ok , sounds good.
@kgpai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
I filed #1739 to free Velox test utils from gtest. |
Summary: `velox/dwio/dwrf/test/utils/E2EWriterTestUtil.cpp` depends on googletest. Enabling `VELOX_BUILD_TEST_UTILS` now enables googletest. Pull Request resolved: facebookincubator#1738 Reviewed By: amitkdutta Differential Revision: D36819015 Pulled By: kgpai fbshipit-source-id: fbe45a9c893ad78871055de68c8a0a515e3020a4
Summary: `velox/dwio/dwrf/test/utils/E2EWriterTestUtil.cpp` depends on googletest. Enabling `VELOX_BUILD_TEST_UTILS` now enables googletest. Pull Request resolved: facebookincubator#1738 Reviewed By: amitkdutta Differential Revision: D36819015 Pulled By: kgpai fbshipit-source-id: fbe45a9c893ad78871055de68c8a0a515e3020a4
…Clickhouse successfully (facebookincubator#1740) What changes were proposed in this pull request? (Fixes: facebookincubator#1738) How was this patch tested? manual tests, run ep/build-clickhouse/src/build_clickhouse.sh
velox/dwio/dwrf/test/utils/E2EWriterTestUtil.cpp
depends on googletest. EnablingVELOX_BUILD_TEST_UTILS
now enables googletest.