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

- [waf] skip test for cross-building (m1) #6122

Merged
merged 2 commits into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions recipes/waf/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class WafConan(ConanFile):
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://waf.io"
license = "BSD-3-Clause"
settings = "os_build", "arch_build"
settings = "os", "arch"

@property
def _source_subfolder(self):
Expand Down Expand Up @@ -40,7 +40,7 @@ def package(self):
self.copy("waf-light", src=self._source_subfolder, dst=binpath)
self.copy("waflib/*", src=self._source_subfolder, dst=libpath)

if self.settings.os_build == "Windows":
if self.settings.os == "Windows":
self.copy("waf.bat", src=os.path.join(self._source_subfolder, "utils"), dst=binpath)

os.chmod(os.path.join(binpath, "waf"), 0o755)
Expand Down
9 changes: 7 additions & 2 deletions recipes/waf/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ class TestPackageConan(ConanFile):
exports_sources = "a.cpp", "b.cpp", "main.c", "main.cpp", "wscript"

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps this should contain test_type = "build_requires" + required_conan_version = ">=1.36.0"?

https://docs.conan.io/en/latest/devtools/build_requires.html#testing-build-requires

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 may contain that, still, waf.exe will be ARMv8 and it will fail?

Copy link
Contributor

Choose a reason for hiding this comment

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

waf is python-only. There is no binary that I'm aware of.
This recipe still uses os_build and arch_build.
Perhaps switching to os/arch will improve cross builds?

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 should, I am not a fan of os_build/arch_build

def build(self):
if tools.cross_building(self.settings):
return

for src in self.exports_sources:
shutil.copy(os.path.join(self.source_folder, src), self.build_folder)

waf_path = tools.which("waf").replace("\\", "/")
assert waf_path.startswith(str(self.deps_cpp_info["waf"].rootpath))
waf_path = tools.which("waf")
if waf_path:
waf_path = waf_path.replace("\\", "/")
assert waf_path.startswith(str(self.deps_cpp_info["waf"].rootpath))

with tools.vcvars(self.settings) if self.settings.compiler == "Visual Studio" else tools.no_op():
self.run("waf -h")
Expand Down