-
Notifications
You must be signed in to change notification settings - Fork 18
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 use of Backward on macOS #67
Conversation
`$<TARGET_FILE>` yields the full path of the library in the build directory, which will likely not be available in binary distributions of ign-tools. This instead uses the install path of the library. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
in downstream packages, we typically configure/generate two I think we should consider doing that here and adding a test that invokes |
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
I've added tests that use cmake to invoke |
here's an example from ign-cmake2 that configures junit files for pass and failure. It configures the failure case to the test_results folder, then copies the junit_pass file if the test succeeds:
it's a little clunky, but it doesn't need gtest |
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.
thanks for the quick fix here; I have two small comments about the implementation
src/ign.in
Outdated
rescue SharedLibInterface::DLError | ||
puts "Library error: #{backward_library_name} not found. Improved backtrace"\ | ||
puts 'Library error: @backward_library_name@ not found. Improved backtrace'\ |
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.
I think we can use STDERR.puts
here, which might also help with the test failures that have expectations on the stdout
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.
Done in 311d588. I used warn
instead because codecheck didn't like STDERR.puts
.
src/CMakeLists.txt
Outdated
set(cmd_script_generated_test "${PROJECT_BINARY_DIR}/test/lib/$<CONFIG>/ruby/ignition/cmd${IGN_DESIGNIATION}_TEST.rb") | ||
|
||
configure_file( | ||
"cmd${IGN_DESIGNIATION}_TEST.rb.in" |
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.
I don't see any @
symbols in this file that need configuring. I think we can just add it as cmdtools_TEST.rb
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.
Done in 311d588.
src/CMakeLists.txt
Outdated
OUTPUT "${yaml_output_generated_test}" | ||
INPUT "${yaml_output_configured_test}") | ||
|
||
add_test(NAME UNIT_ign_TEST COMMAND ruby ${ign_script_generated_test} tools_TEST) |
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.
calling ruby
like this will work if it's in the PATH
. In some cases, we may need to find_program
and refer to the cmake variable here, but we can address that once we see CI failures
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.
Sounds good.
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
The changes in 311d588 output test results that I thought were consumable by Jenkins based on the examples listed in #67 (comment). But Jenkins still says no tests found. Also, I see a pending |
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.
just one small suggestion; looks good
src/CMakeLists.txt
Outdated
# Used for the installed version. | ||
if(APPLE) | ||
# On macOS, the full path to the library since DYLD_LIBRARY_PATH may not work. | ||
set(backward_library_name ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/$<TARGET_FILE_NAME:backward>) |
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.
someone recently submitted gazebosim/gazebo-classic#3076 to change ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}
to ${CMAKE_INSTALL_FULL_LIBDIR}
, so I think we could do the same here
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
there's a DSL change needed to expect tests from ign-tools https://github.com/ignition-tooling/release-tools/blob/master/jenkins-scripts/dsl/ignition.dsl#L41
yes it's related to gazebo-tooling/release-tools#537. I'll enable tests for ign-tools in that PR and then request your review |
@osrf-jenkins run tests please |
the |
tests are working on ubuntu: https://build.osrfoundation.org/job/ignition_tools-ci-pr_any-ubuntu_auto-amd64/191/testReport/(root)/ |
@osrf-jenkins run tests please |
there's one more change needed in release-tools: gazebo-tooling/release-tools#540 I had already restarted a CI job and saw its failure |
this has been merged and CI is now working |
@osrf-jenkins run tests please |
FYI @azeey, the error is still appearing in the buildfarm: build.osrfoundation.org/sdformat-ci-sdformat9-homebrew-amd64#81/. Not sure if I'm missing something. |
We need to make a patch release for macOS to fix it there. The plan is to make a release for all platforms today pending gazebo-release/gz-tools-release#2. If that doesn't get merged today, we'll do a patch release just for macOS. \cc @j-rivero |
🦟 Bug fix
Summary
SDFormat CI (eg. https://build.osrfoundation.org/job/sdformat-ci-sdformat10-homebrew-amd64/48/) is failing on macOS because
ign
fails to findlibignition-tools-backward
. The problem is that$<TARGET_FILE>
yields the full path of the library in the builddirectory, which will likely not be available in binary distributions of
ign-tools
. This instead uses the install path of the library.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge