Skip to content

conan: Do not run tests when cross compiling - #430

Merged
henryiii merged 3 commits into
CLIUtils:masterfrom
geir-t:master
Feb 17, 2020
Merged

henryiii merged 3 commits into
CLIUtils:masterfrom
geir-t:master

Conversation

@geir-t

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

Copy link
Copy Markdown
Contributor

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

codecov Bot commented Feb 12, 2020 •

Copy link
Copy Markdown

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
Copy Markdown
Collaborator

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

@henryiii

Copy link
Copy Markdown
Collaborator

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

@henryiii

Copy link
Copy Markdown
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

geir-t commented Feb 13, 2020

Copy link
Copy Markdown
Contributor Author

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

Comment thread test_package/conanfile.py
def test(self):
os.chdir("bin")
self.run(".%sexample" % os.sep)
if not tools.cross_building(self.settings):

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
1 of 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