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 macOS/windows tests that failed to load library #60

Merged
merged 4 commits into from
Nov 12, 2020

Conversation

scpeters
Copy link
Member

@scpeters scpeters commented Nov 9, 2020

This adds a GitHub actions workflow that uses macOS Catalina to help debug the UNIT_Lidar_TEST failures reported in #4. It turns out that all the windows test failures and most on macOS are caused by a failure to load sensor component libraries properly and can be fixed by properly setting environment variables for the tests.

In windows CI and the macOS workflow (which runs make test before make install) tests were failing with the message "Unable to find sensor plugin path". This is fixed by setting the IGN_PLUGIN_PATH in cmake to the build folder containing the compiled plugins.

In the macOS jenkins build (which runs make test after make install) tests were failing with the message "SDF sensor type does not match template type". It was difficult to track down, but it appears to be caused by a failure to properly dlopen all the shared libraries linked by the component plugins when a test finds an installed component library, rather than one from the build folder. It is fixed by setting DYLD_LIBRARY_PATH to include the location of the installed libraries.

There were also some AddPluginPaths calls in integration tests that didn't work on all platforms and are now redundant after setting the environment variables in cmake, so I've removed those lines from the tests.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
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.

Cool!

src/CMakeLists.txt Show resolved Hide resolved
@scpeters
Copy link
Member Author

I'm going to rebase and then mark this ready for review

@scpeters scpeters changed the title Add workflow for macos-latest Fix macOS/windows tests that failed to load library Nov 10, 2020
This fixes tests on macOS and windows that were failing to
find and/or load a sensor component library.

In windows CI and the macOS workflow (which runs `make test`
before `make install`) tests were failing with
the message "Unable to find sensor plugin path".
This is fixed by setting the IGN_PLUGIN_PATH in cmake to
the build folder containing the compiled plugins.

In the macOS jenkins build (which runs `make test` after
`make install`) tests were failing with the message
"SDF sensor type does not match template type". It was
difficult to track down, but it appears to be caused by
a failure to properly dlopen all the shared libraries
linked by the component plugins when a test finds an
installed component library, rather than one from the build
folder. It is fixed by setting DYLD_LIBRARY_PATH to include
the location of the installed libraries.

Fixes gazebosim#4.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
They don't work on windows, so just depend on the
environment variables set in cmake instead.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters scpeters added this to Inbox in Core development via automation Nov 10, 2020
@scpeters scpeters moved this from Inbox to In review in Core development Nov 10, 2020
@scpeters scpeters marked this pull request as ready for review November 10, 2020 23:00
@scpeters
Copy link
Member Author

I've updated the pull request description, and this is now ready for review. All windows tests are fixed, and most macOS tests are fixed; there are just a few remaining complaining about "lazy symbol binding failed" in ogre. I'll open a separate issue for those.

@scpeters
Copy link
Member Author

this also fixes #49

@scpeters
Copy link
Member Author

there are just a few remaining complaining about "lazy symbol binding failed" in ogre. I'll open a separate issue for those.

I opened #62 to track those remaining test failures

@chapulina chapulina added macOS macOS support tests Broken or missing tests / testing infra Windows Windows support labels Nov 11, 2020
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.

Great to see all those tests fixed and the new macOS CI! I just have a comment about maybe moving the new action, for your consideration.

.github/workflows/macos.yml Show resolved Hide resolved
Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

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

thanks for fix this. Looks good to me.

@chapulina chapulina added the 🔮 dome Ignition Dome label Nov 12, 2020
@scpeters scpeters merged commit 655ffb2 into gazebosim:ign-sensors4 Nov 12, 2020
Core development automation moved this from In review to Done Nov 12, 2020
@scpeters scpeters deleted the macos_workflow_4 branch November 12, 2020 05:23
@scpeters scpeters mentioned this pull request Nov 12, 2020
scpeters added a commit to scpeters/ign-sensors that referenced this pull request Nov 19, 2020
* Add workflow for macos-latest
* Set test env to help find plugins

This fixes tests on macOS and windows that were failing to
find and/or load a sensor component library.

In windows CI and the macOS workflow (which runs `make test`
before `make install`) tests were failing with
the message "Unable to find sensor plugin path".
This is fixed by setting the IGN_PLUGIN_PATH in cmake to
the build folder containing the compiled plugins.

In the macOS jenkins build (which runs `make test` after
`make install`) tests were failing with the message
"SDF sensor type does not match template type". It was
difficult to track down, but it appears to be caused by
a failure to properly dlopen all the shared libraries
linked by the component plugins when a test finds an
installed component library, rather than one from the build
folder. It is fixed by setting DYLD_LIBRARY_PATH to include
the location of the installed libraries.

Fixes gazebosim#4.

* Remove redundant AddPluginPaths calls from tests

They don't work on windows, so just depend on the
environment variables set in cmake instead.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
scpeters added a commit to scpeters/ign-sensors that referenced this pull request Nov 20, 2020
* Add workflow for macos-latest
* Set test env to help find plugins

This fixes tests on macOS and windows that were failing to
find and/or load a sensor component library.

In windows CI and the macOS workflow (which runs `make test`
before `make install`) tests were failing with
the message "Unable to find sensor plugin path".
This is fixed by setting the IGN_PLUGIN_PATH in cmake to
the build folder containing the compiled plugins.

In the macOS jenkins build (which runs `make test` after
`make install`) tests were failing with the message
"SDF sensor type does not match template type". It was
difficult to track down, but it appears to be caused by
a failure to properly dlopen all the shared libraries
linked by the component plugins when a test finds an
installed component library, rather than one from the build
folder. It is fixed by setting DYLD_LIBRARY_PATH to include
the location of the installed libraries.

Fixes gazebosim#4.

* Remove redundant AddPluginPaths calls from tests

They don't work on windows, so just depend on the
environment variables set in cmake instead.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
azeey pushed a commit to azeey/gz-sensors that referenced this pull request Feb 18, 2021
* Add workflow for macos-latest
* Set test env to help find plugins

This fixes tests on macOS and windows that were failing to
find and/or load a sensor component library.

In windows CI and the macOS workflow (which runs `make test`
before `make install`) tests were failing with
the message "Unable to find sensor plugin path".
This is fixed by setting the IGN_PLUGIN_PATH in cmake to
the build folder containing the compiled plugins.

In the macOS jenkins build (which runs `make test` after
`make install`) tests were failing with the message
"SDF sensor type does not match template type". It was
difficult to track down, but it appears to be caused by
a failure to properly dlopen all the shared libraries
linked by the component plugins when a test finds an
installed component library, rather than one from the build
folder. It is fixed by setting DYLD_LIBRARY_PATH to include
the location of the installed libraries.

Fixes gazebosim#4.

* Remove redundant AddPluginPaths calls from tests

They don't work on windows, so just depend on the
environment variables set in cmake instead.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
azeey pushed a commit to azeey/gz-sensors that referenced this pull request Feb 18, 2021
Fix macOS/windows tests that failed to load library (gazebosim#60)

* Add workflow for macos-latest
* Set test env to help find plugins

This fixes tests on macOS and windows that were failing to
find and/or load a sensor component library.

In windows CI and the macOS workflow (which runs `make test`
before `make install`) tests were failing with
the message "Unable to find sensor plugin path".
This is fixed by setting the IGN_PLUGIN_PATH in cmake to
the build folder containing the compiled plugins.

In the macOS jenkins build (which runs `make test` after
`make install`) tests were failing with the message
"SDF sensor type does not match template type". It was
difficult to track down, but it appears to be caused by
a failure to properly dlopen all the shared libraries
linked by the component plugins when a test finds an
installed component library, rather than one from the build
folder. It is fixed by setting DYLD_LIBRARY_PATH to include
the location of the installed libraries.

Fixes gazebosim#4.

* Remove redundant AddPluginPaths calls from tests

They don't work on windows, so just depend on the
environment variables set in cmake instead.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
azeey pushed a commit that referenced this pull request Feb 18, 2021
Fix macOS/windows tests that failed to load library (#60)

* Add workflow for macos-latest
* Set test env to help find plugins

This fixes tests on macOS and windows that were failing to
find and/or load a sensor component library.

In windows CI and the macOS workflow (which runs `make test`
before `make install`) tests were failing with
the message "Unable to find sensor plugin path".
This is fixed by setting the IGN_PLUGIN_PATH in cmake to
the build folder containing the compiled plugins.

In the macOS jenkins build (which runs `make test` after
`make install`) tests were failing with the message
"SDF sensor type does not match template type". It was
difficult to track down, but it appears to be caused by
a failure to properly dlopen all the shared libraries
linked by the component plugins when a test finds an
installed component library, rather than one from the build
folder. It is fixed by setting DYLD_LIBRARY_PATH to include
the location of the installed libraries.

Fixes #4.

* Remove redundant AddPluginPaths calls from tests

They don't work on windows, so just depend on the
environment variables set in cmake instead.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@chapulina chapulina mentioned this pull request Mar 15, 2021
chapulina added a commit that referenced this pull request Mar 18, 2021
* Prepare fo 3.2.0 release (#94)

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Backport #60 from ign-sensors4

Fix macOS/windows tests that failed to load library (#60)

* Add workflow for macos-latest
* Set test env to help find plugins

This fixes tests on macOS and windows that were failing to
find and/or load a sensor component library.

In windows CI and the macOS workflow (which runs `make test`
before `make install`) tests were failing with
the message "Unable to find sensor plugin path".
This is fixed by setting the IGN_PLUGIN_PATH in cmake to
the build folder containing the compiled plugins.

In the macOS jenkins build (which runs `make test` after
`make install`) tests were failing with the message
"SDF sensor type does not match template type". It was
difficult to track down, but it appears to be caused by
a failure to properly dlopen all the shared libraries
linked by the component plugins when a test finds an
installed component library, rather than one from the build
folder. It is fixed by setting DYLD_LIBRARY_PATH to include
the location of the installed libraries.

Fixes #4.

* Remove redundant AddPluginPaths calls from tests

They don't work on windows, so just depend on the
environment variables set in cmake instead.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>

* 👩‍🌾 Clear Windows warnings (backport #58) (#102)

Signed-off-by: Louise Poubel <louise@openrobotics.org>

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

* Master branch updates (#106)

Signed-off-by: Louise Poubel <louise@openrobotics.org>

Co-authored-by: Nate Koenig <nkoenig@users.noreply.github.com>
Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Steve Peters <scpeters@openrobotics.org>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
@j-rivero j-rivero removed this from Done in Core development May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔮 dome Ignition Dome macOS macOS support tests Broken or missing tests / testing infra Windows Windows support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants