-
Notifications
You must be signed in to change notification settings - Fork 53
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
[drake_cmake_external] Add test case to disable solver #370
[drake_cmake_external] Add test case to disable solver #370
Conversation
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.
+@jwnimmer-tri for feature review, please!
Reviewable status: all discussions resolved, LGTM missing from assignee jwnimmer-tri, platform LGTM missing (waiting on @jwnimmer-tri)
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.
Note that the CI failure in Jenkins is expected, since it's using Drake master which doesn't yet have the CMake solver opt-out flags.
Reviewable status: all discussions resolved, LGTM missing from assignee jwnimmer-tri, platform LGTM missing (waiting on @jwnimmer-tri)
A nice tool we sometimes use in cases like this is to temporarily add a commit here that re-points Drake to the pull request instead of master, so CI here will shine light. Then after the Drake PR lands, we revert that edit. |
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.
Reviewed 2 of 3 files at r1, all commit messages.
Reviewable status: 2 unresolved discussions, LGTM missing from assignee jwnimmer-tri, platform LGTM missing
drake_cmake_external/drake_external_examples/solver_disabled_test.py
line 4 at r2 (raw file):
""" Provides an example of disabling the open-source CSDP solver.
nit This doesn't quite smell right to me.
It seems more clear would be something along the lines of "Our CMakeLists.txt file disabled the CSDP solver as part of the Drake build. Here, we'll check that the opt-out succeeded."
Code quote:
Provides an example of
drake_cmake_external/CMakeLists.txt
line 115 at r2 (raw file):
-DWITH_USER_FMT:BOOLEAN=ON -DWITH_USER_SPDLOG:BOOLEAN=ON -DWITH_CSDP:BOOLEAN=OFF
nit A first-time Drake user will not be able to understand why this line is here. We should have an expository comment here or nearby that is sufficient for them to not be confused.
Perhaps something like "The Drake build has options to turn features on/off. See https://drake.mit.edu/from_source.html for the full list. Here, we demonstrate how to set an arbitrary option."?
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.
Reviewable status: 2 unresolved discussions, LGTM missing from assignee jwnimmer-tri, platform LGTM missing (waiting on @jwnimmer-tri)
drake_cmake_external/CMakeLists.txt
line 115 at r2 (raw file):
Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
nit A first-time Drake user will not be able to understand why this line is here. We should have an expository comment here or nearby that is sufficient for them to not be confused.
Perhaps something like "The Drake build has options to turn features on/off. See https://drake.mit.edu/from_source.html for the full list. Here, we demonstrate how to set an arbitrary option."?
Yes, agreed. I added that comment and included a note about it corresponding to one of the open-source dependencies.
drake_cmake_external/drake_external_examples/solver_disabled_test.py
line 4 at r2 (raw file):
Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
nit This doesn't quite smell right to me.
It seems more clear would be something along the lines of "Our CMakeLists.txt file disabled the CSDP solver as part of the Drake build. Here, we'll check that the opt-out succeeded."
Yes, that makes sense. I replaced that comment.
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.
Reviewed 1 of 2 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: 1 unresolved discussion, platform LGTM from [jwnimmer-tri] (waiting on @tyler-yankee)
drake_cmake_external/CMakeLists.txt
line 98 at r4 (raw file):
ExternalProject_Add(drake DEPENDS eigen fmt spdlog URL https://github.com/RobotLocomotion/drake/archive/master.tar.gz
Working
Reminder to myself to make sure we revert this before landing the PR.
BTW the new test case is actually failing... |
Yeah, I'm looking into it now. Something weird is going on with the types on the options defined by the function. |
By the way, these options should technically be defined as |
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.
Reviewable status: 2 unresolved discussions, platform LGTM from [jwnimmer-tri] (waiting on @tyler-yankee)
drake_cmake_external/CMakeLists.txt
line 119 at r4 (raw file):
Should this be changed, ....
That's a question for the Kitware side. I don't know enough about CMake to have an opinion here.
... and if so, in this PR?
I'm OK with whatever PR split or non-split you decide.
Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
@BetsyMcPhail: could you take a look at this? |
6032927
to
0bb71ce
Compare
Provisioning script flaked on one of the Bazel examples in Jenkins, rebuilding ... |
Okay, CI is all happy again. I had a couple of bugs in the new function to work out. |
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.
Reviewable status: 2 unresolved discussions, platform LGTM from [jwnimmer-tri] (waiting on @jwnimmer-tri and @tyler-yankee)
drake_cmake_external/CMakeLists.txt
line 119 at r4 (raw file):
Previously, tyler-yankee wrote…
@BetsyMcPhail: could you take a look at this?
I think we should update all of these to use BOOL
.
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.
(modulo the test-only code being removed)
Reviewable status: 1 unresolved discussion, platform LGTM from [jwnimmer-tri, betsymcphail] (waiting on @jwnimmer-tri)
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.
Reviewed 1 of 1 files at r7, all commit messages.
Reviewable status: 1 unresolved discussion, platform LGTM from [jwnimmer-tri, betsymcphail] (waiting on @tyler-yankee)
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.
Reviewed 1 of 1 files at r8, all commit messages.
Reviewable status: 1 unresolved discussion, platform LGTM from [jwnimmer-tri, betsymcphail] (waiting on @jwnimmer-tri)
drake_cmake_external/CMakeLists.txt
line 98 at r4 (raw file):
Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Working
Reminder to myself to make sure we revert this before landing the PR.
Tomorrow morning, hopefully the new nightly build packages will be usable here.
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.
Reviewable status: 1 unresolved discussion, platform LGTM from [jwnimmer-tri, betsymcphail] (waiting on @tyler-yankee)
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.
Reviewed 1 of 1 files at r9, all commit messages.
Reviewable status:complete! all discussions resolved, platform LGTM from [jwnimmer-tri, betsymcphail] (waiting on @tyler-yankee)
Addresses #22547. See #22626 for the change on Drake. This change adds a unit test to
drake_cmake_external
to test by disabling the CSDP solver.Tested locally by changing the URL pointed to by
ExternalProject_Add(drake)
to the feature branch on Drake.This change is