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