Fix set of GZ_SIM_RESOURCE_PATH in tests on Windows #190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was trying to get the tests on Windows to work, and I noticed that the modifications in https://github.com/robotology/gz-sim-yarp-plugins/pull/176/files were unix-specific, as they used
:
as separator for env variables that contain list of paths, while on Windows;
is used (as:
could be ambigous with the driver letter separator, i.e. the lists on Windows areC:\src;C:\otherdir
, notC:\src:C:\otherdir
that would be ambiguous.To fix this, I modified the CMake to use ENVIRONMENT_MODIFICATION and
path_list_append
command, that handles this differences between Windows and *nix automatically, see https://cmake.org/cmake/help/latest/prop_test/ENVIRONMENT_MODIFICATION.html .To do so, I bumped the minimum CMake version to 3.22 .
Furthermore, I also added
.Finalize()
calls to all the fixtures that were missing them, to get rid of the"[Wrn] [D:\bld\gz-sim8_1713968558858\work\src\TestFixture.cc:208] Fixture has not been finalized, any functions you attemptedto hook into will not be run. It is recommended to call Finalize()before accessing the server.
warnings.I also removed the
LIBGL_ALWAYS_SOFTWARE=1
, as they are not necessary since gazebosim/gz-sim#920 has been fixed.Fix #181 .