-
Notifications
You must be signed in to change notification settings - Fork 610
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
[upstream_utils] Add Catch2 #6951
base: main
Are you sure you want to change the base?
Conversation
8a74859
to
7a84460
Compare
How do we wanna approach the Gradle build for this? |
7a84460
to
c030eee
Compare
Wait how is gradle passing 💀 |
0e6710b
to
550e141
Compare
I don't think what I've done so far address the |
Well, I don't think we need to globally support the cmakedefine's, only what we think we'll actually want to customize in the gradle config. What you have is likely good enough. |
In that case this is ready for review 🙂 |
I think it would be good to add in this PR a simple catch2 test in wpiutil to check to make sure it actually works and hooks into the build the way we want. |
The tests wont run on Gradle cause we dont have a Catch2 test runner (I don't think that should be blocking for this pr though) |
795bcd5
to
6b00dc7
Compare
f98265b
to
d5d63eb
Compare
d5d63eb
to
cc69f2d
Compare
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.
Try copying googletest.gradle and swapping out the googletest references with catch2. Then apply the new catch2 file the same way the googletest file is applied. I don't think we actually use Gradle's googletest-specific integrations, since I think we just run the test executable and check for exit code 0. If that's the case, we can pretend like our Catch2 tests are "GoogleTest" tests, and Gradle shouldn't have a problem with running them.
We use |
5deccdc
to
f4776ea
Compare
Ohh I think I see the issue its like the dumb protobuf bs |
32c0046
to
658011c
Compare
Looks like you're going to have to patch the user config header to not have |
I guess it wouldn't be too hard to just replace every cmakedefine with a define... |
Gradle hates me |
ce60635
to
ae03b74
Compare
ae03b74
to
11ebe36
Compare
Signed-off-by: Jade Turner <[email protected]>
Probably want to update this to use the latest commit of Catch2 as well. |
Signed-off-by: Jade Turner <[email protected]>
I think the solution to the config header is to just clone the repo, configure the build with CMake, and copy the generated header into our source tree. Bonus points if you can set up a generation script for it. |
I took a look at the generated file, we actually only need to replace two options (the one with values). The rest can be commented out and it'll use the default. I think if we can do that properly it'll be fine. |
Signed-off-by: Jade Turner <[email protected]>
Signed-off-by: Jade Turner <[email protected]>
Signed-off-by: Jade Turner <[email protected]>
Signed-off-by: Jade Turner <[email protected]>
Signed-off-by: Jade Turner <[email protected]>
Signed-off-by: Jade Turner <[email protected]>
Signed-off-by: Jade Turner <[email protected]>
This reverts commit 39e677b.
Signed-off-by: Jade Turner <[email protected]>
Resolves #6946