Skip to content
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

Fix UNIT_Server_TEST on Windows #1577

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

traversaro
Copy link
Contributor

@traversaro traversaro commented Jul 6, 2022

🦟 Bug fix

Summary

This PR fixes the execution of UNIT_Server_TEST on Windows, by using the ; environment variables path separator instead of hardcoding the using of the : separator.

Before this patch, on my system the UNIT_Server_TEST was failing with error:

27: C:\src\ign-gazebo\src\Server_TEST.cc(1135): error: Expected equality of these values:
27:   _expected
27:     Which is: "C:\\src\\ign-gazebo\\test\\worlds\\plugins.sdf"
27:   res.data()
27:     Which is: "\\src\\ign-gazebo\\test\\worlds\\plugins.sdf"
27: Expected[C:\src\ign-gazebo\test\worlds\plugins.sdf] Received[\src\ign-gazebo\test\worlds\plugins.sdf]
27: [Dbg] [C:\src\ign-gazebo\src\Server_TEST.cc:1128] Requesting /gazebo/resource_paths/resolve
27: C:\src\ign-gazebo\src\Server_TEST.cc(1135): error: Expected equality of these values:
27:   _expected
27:     Which is: "C:\\src\\ign-gazebo\\test\\worlds\\plugins.sdf"
27:   res.data()
27:     Which is: "\\src\\ign-gazebo\\test\\worlds\\plugins.sdf"
27: Expected[C:\src\ign-gazebo\test\worlds\plugins.sdf] Received[\src\ign-gazebo\test\worlds\plugins.sdf]
27: [Dbg] [C:\src\ign-gazebo\src\Server_TEST.cc:1128] Requesting /gazebo/resource_paths/resolve
27: [Dbg] [C:\src\ign-gazebo\src\Server_TEST.cc:1128] Requesting /gazebo/resource_paths/resolve
27: C:\src\ign-gazebo\src\Server_TEST.cc(1135): error: Expected equality of these values:
27:   _expected
27:     Which is: "C:\\src\\ign-gazebo\\test\\worlds\\models\\include_nested\\model.sdf"
27:   res.data()
27:     Which is: "\\src\\ign-gazebo\\test\\worlds\\models\\include_nested\\model.sdf"
27: Expected[C:\src\ign-gazebo\test\worlds\models\include_nested\model.sdf] Received[\src\ign-gazebo\test\worlds\models\include_nested\model.sdf]
27: [  FAILED  ] ServerRepeat/ServerFixture.ResolveResourcePaths/0, where GetParam() = 1 (142 ms)
27: [ RUN      ] ServerRepeat/ServerFixture.Stop/0
27: [Msg] Loading SDF world file[C:\src\ign-gazebo\test\worlds\shapes.sdf].
27: [Msg] Serving entity system service on [/entity/system/add]
27: [Msg] Loaded level [3]
27: [Msg] No systems loaded from SDF, loading defaults
27: [Wrn] [D:\bld\libignition-common4_1656525324646\work\src\Util.cc:368] Reading environment variable with _allowEmpty==true is unsupported on Windows.
27: [Dbg] [C:\src\ign-gazebo\src\ServerConfig.cc:999] Loaded (3) plugins from file [C:\src\ign-gazebo\build\test\fake_home\.ignition\gazebo\6\server.config]
27: [Dbg] [C:\src\ign-gazebo\src\systems\physics\Physics.cc:803] Loaded [ignition::physics::dartsim::Plugin] from library [C:\Users\STraversaro\AppData\Local\mambaforge\envs\igngaz\Library\lib\ign-physics-5\engine-plugins\ignition-physics-dartsim-plugin.dll]
27: [Dbg] [C:\src\ign-gazebo\src\SystemManager.cc:58] Loaded system [ignition::gazebo::systems::Physics] for entity [1]
27: [Msg] Create service on [/world/default/create]
27: [Msg] Remove service on [/world/default/remove]
27: [Msg] Pose service on [/world/default/set_pose]
27: [Msg] Pose service on [/world/default/set_pose_vector]
27: [Msg] Light configuration service on [/world/default/light_config]
27: [Msg] Physics service on [/world/default/set_physics]
27: [Msg] SphericalCoordinates service on [/world/default/set_spherical_coordinates]
27: [Msg] Enable collision service on [/world/default/enable_collision]
27: [Msg] Disable collision service on [/world/default/disable_collision]
27: [Msg] Material service on [/world/default/visual_config]
27: [Msg] Material service on [/world/default/wheel_slip]
27: [Dbg] [C:\src\ign-gazebo\src\SystemManager.cc:58] Loaded system [ignition::gazebo::systems::UserCommands] for entity [1]
27: [Dbg] [C:\src\ign-gazebo\src\SystemManager.cc:58] Loaded system [ignition::gazebo::systems::SceneBroadcaster] for entity [1]
27: [Msg] Serving world controls on [/world/default/control], [/world/default/control/state] and [/world/default/playback/control]
27: [Msg] Serving GUI information on [/world/default/gui/info]
27: [Msg] World [default] initialized with [1ms] physics profile.
27: [Msg] Serving world SDF generation service on [/world/default/generate_world_sdf]
27: [Msg] Serving world names on [/gazebo/worlds]
27: [Msg] Resource path add service on [/gazebo/resource_paths/add].
27: [Msg] Resource path get service on [/gazebo/resource_paths/get].
27: [Msg] Resource path resolve service on [/gazebo/resource_paths/resolve].
27: [Msg] Resource paths published on [/gazebo/resource_paths].
27: [Msg] Server control service on [/server_control].
27: [Msg] Found no publishers on /stats, adding root stats topic
27: [Msg] Found no publishers on /clock, adding root clock topic
27: [       OK ] ServerRepeat/ServerFixture.Stop/0 (180 ms)
27: [----------] 15 tests from ServerRepeat/ServerFixture (5506 ms total)
27:
27: [----------] Global test environment tear-down
27: [==========] 15 tests from 1 test suite ran. (5506 ms total)
27: [  PASSED  ] 14 tests.
27: [  FAILED  ] 1 test, listed below:
27: [  FAILED  ] ServerRepeat/ServerFixture.ResolveResourcePaths/0, where GetParam() = 1
27:
27:  1 FAILED TEST
27:   YOU HAVE 12 DISABLED TESTS
27:
1/2 Test #27: UNIT_Server_TEST .................***Failed    6.54 sec

After this patch the test is passing fine.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Silvio <silvio@traversaro.it>
@traversaro traversaro requested a review from chapulina as a code owner July 6, 2022 14:51
@chapulina chapulina added tests Broken or missing tests / testing infra Windows Windows support 🏯 fortress Ignition Fortress labels Jul 6, 2022
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @traversaro ! LGTM. Let's wait for CI before merging.

@chapulina chapulina merged commit f39bc25 into gazebosim:ign-gazebo6 Jul 6, 2022
andyblarblar pushed a commit to andyblarblar/gz-sim that referenced this pull request Jul 8, 2022
Signed-off-by: Silvio <silvio@traversaro.it>
liamhan0905 pushed a commit that referenced this pull request Jul 25, 2022
Signed-off-by: Silvio <silvio@traversaro.it>
Signed-off-by: Liam Han <liamhan0905@gmail.com>
liamhan0905 pushed a commit that referenced this pull request Jul 25, 2022
Signed-off-by: Silvio <silvio@traversaro.it>
Signed-off-by: Liam Han <liamhan0905@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress tests Broken or missing tests / testing infra Windows Windows support
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants