-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
build/ops: fix dmclock test-related build breakage by conditionalizing dmclock tests #15174
Conversation
Pushed |
Relevant excerpt from log of failed build:
|
@smithfarm once shaman is happy, it's good to merge, i think. |
@tchaikov Thanks, but SUSE builds are still not happy. Now the build error is:
|
src/dmclock/CMakeLists.txt
Outdated
@@ -17,7 +17,7 @@ if(K_WAY_HEAP) | |||
endif() | |||
|
|||
if (NOT(TARGET gtest AND TARGET gtest_main)) | |||
find_package(gtest REQUIRED) | |||
find_package(GTest REQUIRED) |
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 do include GTest as a submodule. can we point GTEST_ROOT
to the path in the source tree, so FindGTest.cmake
can find it?
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, how?
i think we don't need to use the system gtest: because "battery included".
6045b61
to
edecda0
Compare
OK, dropped that last commit. |
@tchaikov Something like this?
|
@smithfarm something like that, but i am not 100% sure. because at configure time (when we run |
Same error. I'll continue to poke at it. |
I think the build failure is reproducible by passing -DWITH_TESTS=OFF to cmake. |
123ec06
to
3a9708a
Compare
This fixes the |
These tests do not build on OBS and upstream is dropping them. Signed-off-by: Nathan Cutler <ncutler@suse.com>
4e504f3
to
b5678e3
Compare
@ivancich @tchaikov Here is how we could conditionalize the build of the dmclock test binaries. (Note that WITH_TESTS is not appropriate here, because it guards the build of binaries included in the "ceph-test" subpackage.) If we're going to build these dmclock test binaries separately, my view is they should be properly conditionalized. I understand this may mean including the conditional in the upstream dmClock repo as well. |
note that this PR now consists of a single (completely reworked) commit |
5e5d8e9
to
b5678e3
Compare
My concern regarding this PR is that it conflicts with the PR for the second part of the dmclock integration (#14997). That PR, for example, currently does not integrate src/dmclock/CMakeLists.txt with ceph's build, so the changes there will be problematic. And that removes the need for any ceph conditionals to appear within the dmclock library, which, being an external library, would seem inappropriate. |
find_package(gtest REQUIRED) | ||
include_directories(${GTEST_INCLUDE_DIRS}) | ||
endif() | ||
if(WITH_DMCLOCK_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.
WITH_DMCLOCK_TESTS should not appear below src/dmclock. A better approach is the one used in #14997. In fact a good starting point might be the final two commits in that PR. The first is a git subtree pull of the latest dmclock master that significantly reorganizes dmclock's cmake process (see README.git-subtree to see how this is done). The second (commit 8215686) are corresponding changes in ceph's cmake process. This approach as a starting point will avoid conflicts and re-visiting this issue down the line.
@smithfarm I'm currently testing a slight change to #14997, which I think will handle your case as well. I'm currently testing the build. The additions to src/CMakeLists.txt are below and you can also find the entire branch here: https://github.com/ivancich/ceph-fork/tree/wip-bring-in-dmclock-p2-leap .
|
I've added a WITH_DMCLOCK_TESTS commit (04071b6) to PR for part 2 of the dmclock integration (#14997). It also includes the changes you recommended regarding cmake's find_package. @smithfarm does that work for you? |
This is an alternative PR to #14997 (that PR builds only on the most cutting-edge openSUSE version - Tumbleweed . . . still trying to figure out exactly why)
http://tracker.ceph.com/issues/19987