Skip to content

Commit

Permalink
test: msbuilddeps mapping of arch to platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Ferry committed Jun 27, 2022
1 parent b937726 commit fd48992
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions conans/test/integration/toolchains/microsoft/test_msbuilddeps.py
@@ -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

0 comments on commit fd48992

Please sign in to comment.