|
1 | 1 | import os
|
2 | 2 | import platform
|
3 |
| -import re |
4 | 3 | import textwrap
|
5 | 4 |
|
6 | 5 | import pytest
|
7 | 6 |
|
8 | 7 | from conan.test.assets.genconanfile import GenConanfile
|
9 |
| -from conan.test.utils.tools import TestClient |
| 8 | +from conan.tools.files import load |
10 | 9 | from conan.tools.meson import MesonToolchain
|
| 10 | +from conan.test.utils.tools import TestClient |
11 | 11 |
|
12 | 12 |
|
13 | 13 | def test_apple_meson_keep_user_custom_flags():
|
@@ -599,54 +599,6 @@ def test_compiler_path_with_spaces():
|
599 | 599 | assert "cpp = 'cpp compiler path with spaces'" in conan_meson_native
|
600 | 600 |
|
601 | 601 |
|
602 |
| -def test_meson_sysroot_app(): |
603 |
| - """Testing when users pass tools.build:sysroot on the profile with Meson |
604 |
| -
|
605 |
| - The generated conan_meson_cross.ini needs to contain both sys_root property to fill the |
606 |
| - PKG_CONFIG_PATH and the compiler flags with --sysroot. |
607 |
| -
|
608 |
| - When cross-building, Meson needs both compiler_executables in the config, otherwise it will fail |
609 |
| - when running setup. |
610 |
| - """ |
611 |
| - sysroot = "/my/new/sysroot/path" |
612 |
| - client = TestClient() |
613 |
| - profile = textwrap.dedent(f""" |
614 |
| - [settings] |
615 |
| - os = Macos |
616 |
| - arch = armv8 |
617 |
| - compiler = apple-clang |
618 |
| - compiler.version = 13.0 |
619 |
| - compiler.libcxx = libc++ |
620 |
| -
|
621 |
| - [conf] |
622 |
| - tools.build:sysroot={sysroot} |
623 |
| - tools.build:verbosity=verbose |
624 |
| - tools.compilation:verbosity=verbose |
625 |
| - tools.apple:sdk_path=/my/sdk/path |
626 |
| - """) |
627 |
| - profile_build = textwrap.dedent(f""" |
628 |
| - [settings] |
629 |
| - os = Macos |
630 |
| - arch = x86_64 |
631 |
| - compiler = apple-clang |
632 |
| - compiler.version = 13.0 |
633 |
| - compiler.libcxx = libc++ |
634 |
| - """) |
635 |
| - client.save({"conanfile.py": GenConanfile(name="hello", version="0.1") |
636 |
| - .with_settings("os", "arch", "compiler", "build_type") |
637 |
| - .with_generator("MesonToolchain"), |
638 |
| - "build": profile_build, |
639 |
| - "host": profile}) |
640 |
| - client.run("install . -pr:h host -pr:b build") |
641 |
| - # Check the meson configuration file |
642 |
| - conan_meson = client.load("conan_meson_cross.ini") |
643 |
| - assert f"sys_root = '{sysroot}'\n" in conan_meson |
644 |
| - assert re.search(r"c_args =.+--sysroot={}.+".format(sysroot), conan_meson) |
645 |
| - assert re.search(r"c_link_args =.+--sysroot={}.+".format(sysroot), conan_meson) |
646 |
| - assert re.search(r"cpp_args =.+--sysroot={}.+".format(sysroot), conan_meson) |
647 |
| - assert re.search(r"cpp_link_args =.+--sysroot={}.+".format(sysroot), conan_meson) |
648 |
| - |
649 |
| - |
650 | 602 | def test_cross_x86_64_to_x86():
|
651 | 603 | """
|
652 | 604 | https://github.com/conan-io/conan/issues/17261
|
|
0 commit comments