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
Actually Run All Unit Tests in CMake #19462
Conversation
cf368b8
to
d66c25a
Compare
Hmm for some reason its not seeing the replays |
d66c25a
to
8fe9e52
Compare
# Setup testdata. It should be fine here, as the only way to reach here is by explicitly requesting tests. | ||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_LIST_DIR}/testdata" "${CMAKE_CURRENT_BINARY_DIR}/testdata") | ||
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/openrct2\" \"${CMAKE_CURRENT_BINARY_DIR}/data\")") |
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.
It probably doesn't find the data because of this
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.
whats really fun is that it does find the data when i run it locally :). I mean i know I've change the location of the executable but it should still work out. I've got another idea though that should fix it.
This pull request is stale and will be closed in 14 days if no action is taken. To keep it open, leave a comment or remove the |
8fe9e52
to
bde48f0
Compare
Finally worked out why the replays weren't working, we install the replays during install post build but gtest_discover_tests by default runs post build preinstall. i.e. when it discovers the tests there are no replays. |
cmake 3.20+ update: #15501 (comment) BSD is already up to date @gibmat @TheAssassin we are planning to up the required cmake version to 3.20 or later |
👍 bookworm will be shipping with cmake 3.25 -- sounds good to me! |
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.
MultiLaunchTest
is now missing
I'm seeing multi launch in the test results:
Pretty sure that's the only multi launch test. |
Odd, I couldn't find it. Perhaps just some quirk about how the test results are presented preventing browser search from working |
Seems the majority of our tests haven't been running for any platform that uses cmake (i.e. non windows). This rewrites the cmake to a more modern style for the tests and adds all the tests.
I had to disable the tests on any platform that didn't have modern cmake installed as I'm using the newer gtest integration.