Desired behavior
As noted in gazebo-tooling/release-tools#1490, there are tests in gz-sim that are being skipped on macOS due to a missing display. However, we should still build these tests to catch potential compile errors. For example, I ran into a build error on gz-sim8 on macOS that's not caught by CI since reset_sensors.cc is never compiled on that platform. There's a fix for it in #3000, but it was not backported to gz-sim8.
Alternatives considered
None
Implementation suggestion
Instead of appending tests that need display to gtest_source, we can accumulate a separate list and call gz_build_tests on them. We can then obtain the list of test targets from gz_build_tests and call set_test_properties and set the DISABLED property on them.
Desired behavior
As noted in gazebo-tooling/release-tools#1490, there are tests in gz-sim that are being skipped on macOS due to a missing display. However, we should still build these tests to catch potential compile errors. For example, I ran into a build error on
gz-sim8on macOS that's not caught by CI sincereset_sensors.ccis never compiled on that platform. There's a fix for it in #3000, but it was not backported to gz-sim8.Alternatives considered
None
Implementation suggestion
Instead of appending tests that need display to
gtest_source, we can accumulate a separate list and callgz_build_testson them. We can then obtain the list of test targets fromgz_build_testsand callset_test_propertiesand set theDISABLEDproperty on them.