Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: msbuilddeps mapping of arch to platform
- Loading branch information
Mark Ferry
committed
Jun 27, 2022
1 parent
b937726
commit fd48992
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
conans/test/integration/toolchains/microsoft/test_msbuilddeps.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import os | ||
import textwrap | ||
|
||
import pytest | ||
|
||
from conans.test.utils.tools import TestClient | ||
|
||
|
||
@pytest.mark.parametrize("arch,exp_platform", [ | ||
("x86", "Win32"), | ||
("x86_64", "x64"), | ||
("armv7", "ARM"), | ||
("armv8", "ARM64"), | ||
]) | ||
def test_msbuilddeps_maps_architecture_to_platform(arch, exp_platform): | ||
""" | ||
Simple test checking that conantoolchain_release_x64.props is adding all the expected | ||
flags and preprocessor definitions | ||
""" | ||
|
||
client = TestClient(path_with_spaces=False) | ||
client.run("new hello/0.1 --template=msbuild_lib") | ||
client.run(f"install . -g MSBuildDeps -s arch={arch} -pr:b=default -if=install") | ||
toolchain = client.load(os.path.join("conan", "conantoolchain.props")) | ||
expected_import = f"""<Import Condition="'$(Configuration)' == 'Release' And '$(Platform)' == '{exp_platform}'" Project="conantoolchain_release_{exp_platform.lower()}.props"/>""" | ||
assert expected_import in toolchain |