|
5 | 5 | import pytest |
6 | 6 |
|
7 | 7 | from conan.api.subapi.workspace import WorkspaceAPI |
8 | | -from conan.internal.util.files import chdir |
9 | 8 | from conan.test.utils.tools import TestClient |
10 | 9 |
|
11 | 10 | WorkspaceAPI.TEST_ENABLED = "will_break_next" |
@@ -48,49 +47,3 @@ def test_metabuild(): |
48 | 47 | assert "Adding project app1" in c.out |
49 | 48 | c.run_command("cmake --build --preset conan-release") |
50 | 49 | # it doesn't fail |
51 | | - |
52 | | - |
53 | | -@pytest.mark.tool("cmake") |
54 | | -def test_relative_paths(): |
55 | | - # This is using the meta-project |
56 | | - c = TestClient() |
57 | | - c.run("new cmake_lib -d name=liba --output=liba") |
58 | | - c.run("new cmake_exe -d name=app1 -d requires=liba/0.1 --output=app1") |
59 | | - c.run("new cmake_lib -d name=libb --output=other/libb") |
60 | | - c.run("new cmake_exe -d name=app2 -d requires=libb/0.1 --output=other/app2") |
61 | | - c.run("workspace init mywks") |
62 | | - c.run("workspace init otherwks") |
63 | | - # cd mywks |
64 | | - with c.chdir("mywks"): |
65 | | - c.run("workspace add ../liba") |
66 | | - c.run("workspace add ../app1 --product") |
67 | | - c.run("workspace build") |
68 | | - conanws_yml = textwrap.dedent("""\ |
69 | | - editables: |
70 | | - app1/0.1: |
71 | | - path: ../app1 |
72 | | - liba/0.1: |
73 | | - path: ../liba |
74 | | - products: |
75 | | - - ../app1 |
76 | | - """) |
77 | | - assert conanws_yml == c.load("conanws.yml") |
78 | | - # cd otherwks |
79 | | - with c.chdir("otherwks"): |
80 | | - c.run("workspace add ../other/libb") |
81 | | - c.run("workspace add ../other/app2 --product") |
82 | | - c.run("workspace build") |
83 | | - conanws_yml = textwrap.dedent("""\ |
84 | | - editables: |
85 | | - app2/0.1: |
86 | | - path: ../other/app2 |
87 | | - libb/0.1: |
88 | | - path: ../other/libb |
89 | | - products: |
90 | | - - ../other/app2 |
91 | | - """) |
92 | | - assert conanws_yml == c.load("conanws.yml") |
93 | | - |
94 | | - ext = ".exe" if platform.system() == "Windows" else "" |
95 | | - assert os.path.exists(os.path.join(c.current_folder, "app1", "build", "Release", f"app1{ext}")) |
96 | | - assert os.path.exists(os.path.join(c.current_folder, "other", "app2", "build", "Release", f"app2{ext}")) |
0 commit comments