elfutils: fix test_package execution when can_run is false - #28243
Conversation
vanshbhardwajhere
left a comment
There was a problem hiding this comment.
✅ LGTM. The change correctly wraps the test command execution inside if can_run(self):, ensuring tests only run when supported and preventing the Exec format error seen during cross-compilation.
The fix is minimal, targeted, and does not affect other logic.
Marking this bug as resolved.
vanshbhardwajhere
left a comment
There was a problem hiding this comment.
✅ Build and package checks are passing.
❌ Scheduler failure is expected and does not block.
Everything looks good to me — LGTM 👍
|
@conan-center-bot please add this PR to the CI queue |
|
@cynix |
There was a problem hiding this comment.
LGTM.
I can confirm the original issue when cross-building elfutils: elfutils-0.190-linux-cross.log
This hotfix should fix the situation. However, it should be almost working in a regular scenario as eu-ar and eu-objdump are consumed from build environment. Including elfutils as a tool requirement should be able to run both binaries without errors, but it would require a native build available first.
Thank you for your PR!
@uilianries Appreciate your review and guidance! |
|
@uilianries Can you please tell me! |
|
Hi @vanshbhardwajhere - thanks for your contribution. We have a fairly large backlog of PRs we are trying to prioritise - we will get to this one eventually, thanks! |
|
@jcar87 Looking Forward to your Merge! |
jcar87
left a comment
There was a problem hiding this comment.
LGTM, thanks!
apologies for the delay, thanks for the contribution and the explanation
Thanks, I'm Glad |
…28243) * Add vstats recipe version 1.0 * vstats: add test_package and update conandata/config * elfutils: fix test_package execution when can_run is false * Delete recipes/vstats/all directory * Delete recipes/vstats/config.yml
Summary
Changes to recipe: elfutils/[version]
Motivation
When cross-compiling, the test package attempted to execute host binaries unconditionally.
This led to runtime errors such as
Exec format error(e.g., when runningeu-ar --version).This PR ensures the test commands only run when execution is supported (
can_run(self)), preventing failures in cross-compilation environments.Details
test_package/conanfile.pyinsideif can_run(self):.Fixes: #28239