Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 0 additions & 47 deletions test/functional/workspace/test_workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import pytest

from conan.api.subapi.workspace import WorkspaceAPI
from conan.internal.util.files import chdir
from conan.test.utils.tools import TestClient

WorkspaceAPI.TEST_ENABLED = "will_break_next"
Expand Down Expand Up @@ -48,49 +47,3 @@ def test_metabuild():
assert "Adding project app1" in c.out
c.run_command("cmake --build --preset conan-release")
# it doesn't fail


@pytest.mark.tool("cmake")
def test_relative_paths():
# This is using the meta-project
c = TestClient()
c.run("new cmake_lib -d name=liba --output=liba")
c.run("new cmake_exe -d name=app1 -d requires=liba/0.1 --output=app1")
c.run("new cmake_lib -d name=libb --output=other/libb")
c.run("new cmake_exe -d name=app2 -d requires=libb/0.1 --output=other/app2")
c.run("workspace init mywks")
c.run("workspace init otherwks")
# cd mywks
with c.chdir("mywks"):
c.run("workspace add ../liba")
c.run("workspace add ../app1 --product")
c.run("workspace build")
conanws_yml = textwrap.dedent("""\
editables:
app1/0.1:
path: ../app1
liba/0.1:
path: ../liba
products:
- ../app1
""")
assert conanws_yml == c.load("conanws.yml")
# cd otherwks
with c.chdir("otherwks"):
c.run("workspace add ../other/libb")
c.run("workspace add ../other/app2 --product")
c.run("workspace build")
conanws_yml = textwrap.dedent("""\
editables:
app2/0.1:
path: ../other/app2
libb/0.1:
path: ../other/libb
products:
- ../other/app2
""")
assert conanws_yml == c.load("conanws.yml")

ext = ".exe" if platform.system() == "Windows" else ""
assert os.path.exists(os.path.join(c.current_folder, "app1", "build", "Release", f"app1{ext}"))
assert os.path.exists(os.path.join(c.current_folder, "other", "app2", "build", "Release", f"app2{ext}"))
Loading