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

conan: Do not run tests when cross compiling #430

Merged
merged 3 commits into from
Feb 17, 2020
Merged

Conversation

geir-t
Copy link
Contributor

@geir-t geir-t commented Feb 12, 2020

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

Running conan create with a profile made for cross compiling would fail since the tests is not compiled for build OS
@geir-t geir-t requested a review from henryiii February 12, 2020 09:18
@codecov
Copy link

codecov bot commented Feb 12, 2020

Codecov Report

Merging #430 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #430   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        12           
  Lines         3582      3582           
=========================================
  Hits          3582      3582           
Impacted Files Coverage Δ
include/CLI/App.hpp 100.00% <0.00%> (ø) ⬆️
include/CLI/StringTools.hpp 100.00% <0.00%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51a0efc...7eeb903. Read the comment docs.

@henryiii
Copy link
Collaborator

@all-contributors, please add @geir-t for platform

@henryiii
Copy link
Collaborator

I'll try to test this locally soon, then merge. Thanks! The build should not run tests, you are correct.

@henryiii
Copy link
Collaborator

(And, technically, you don't need to build, since the "build" process itself only builds tests - this will probably change in 2.0 though)

@geir-t
Copy link
Contributor Author

geir-t commented Feb 13, 2020

Thank you for the quick response. Ok, then I'll leave the build step alone for now.

@@ -16,5 +16,6 @@ def imports(self):
self.copy("*.dylib*", dst="bin", src="lib")

def test(self):
os.chdir("bin")
self.run(".%sexample" % os.sep)
if not tools.cross_building(self.settings):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this be get_env("CONAN_RUN_TESTS", True) too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay, though I'd recommend bring it up on the Conan docs, to see if the suggestion can be changed.

@henryiii henryiii merged commit b974f81 into CLIUtils:master Feb 17, 2020
@henryiii
Copy link
Collaborator

Thanks!

@henryiii henryiii added this to the v1.9.1 milestone Jun 2, 2020
nksanthosh added a commit to EOSIO/eos that referenced this pull request Aug 3, 2020
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)
@nksanthosh nksanthosh mentioned this pull request Aug 3, 2020
7 tasks
dimas1185 pushed a commit to EOSIO/eos that referenced this pull request Aug 4, 2020
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants