Repository navigation
conan: Do not run tests when cross compiling - #430
Conversation
Running conan create with a profile made for cross compiling would fail since the tests is not compiled for build OS
Codecov Report
@@ Coverage Diff @@
## master #430 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 12 12
Lines 3582 3582
=========================================
Hits 3582 3582
Continue to review full report at Codecov.
|
|
@all-contributors, please add @geir-t for platform |
|
I'll try to test this locally soon, then merge. Thanks! The build should not run tests, you are correct. |
|
(And, technically, you don't need to build, since the "build" process itself only builds tests - this will probably change in 2.0 though) |
|
Thank you for the quick response. Ok, then I'll leave the build step alone for now. |
| def test(self): | ||
| os.chdir("bin") | ||
| self.run(".%sexample" % os.sep) | ||
| if not tools.cross_building(self.settings): |
There was a problem hiding this comment.
Can this be get_env("CONAN_RUN_TESTS", True) too?
There was a problem hiding this comment.
It looks like that variable needs to be defined in the profile, which for us it's currently not. The cross_building func deduces it given the target profile and current host machine so I think that is the right choice. Hopefully that will work out of the box for more people.
I took the liberty of changing to the cross_building check in the main conanfile for the same reasons listed above.
There was a problem hiding this comment.
Okay, though I'd recommend bring it up on the Conan docs, to see if the suggestion can be changed.
|
Thanks! |
This CLI11 update from v1.9.0 to v1.9.1 provides the following improvements: - Support relative inclusion [#475](CLIUtils/CLI11#475) - Fix cases where spaces in paths could break CMake support [#471](CLIUtils/CLI11#471) - Fix an issue with string conversion [#421](CLIUtils/CLI11#421) - Cross-compiling improvement for Conan.io [#430](CLIUtils/CLI11#430) - Fix option group default propagation [#450](CLIUtils/CLI11#450) - Fix for C++20 [#459](CLIUtils/CLI11#459) - Support compiling with RTTI off [#461](CLIUtils/CLI11#461)
This CLI11 update from v1.9.0 to v1.9.1 provides the following improvements: - Support relative inclusion [#475](CLIUtils/CLI11#475) - Fix cases where spaces in paths could break CMake support [#471](CLIUtils/CLI11#471) - Fix an issue with string conversion [#421](CLIUtils/CLI11#421) - Cross-compiling improvement for Conan.io [#430](CLIUtils/CLI11#430) - Fix option group default propagation [#450](CLIUtils/CLI11#450) - Fix for C++20 [#459](CLIUtils/CLI11#459) - Support compiling with RTTI off [#461](CLIUtils/CLI11#461)
Running conan create with a profile made for cross compiling would fail since the tests is not compiled for build OS
Open to other ways of solving this issue