-
Notifications
You must be signed in to change notification settings - Fork 989
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying abs path for config install (#14183)
* trying abs path for config install * wip * minor refactor
- Loading branch information
1 parent
1819908
commit 1d449da
Showing
3 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
conans/test/functional/command/test_custom_symlink_home.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import os | ||
import platform | ||
|
||
import pytest | ||
|
||
from conans.test.utils.scm import create_local_git_repo | ||
from conans.test.utils.test_files import temp_folder | ||
from conans.test.utils.tools import TestClient | ||
from conans.util.files import save | ||
|
||
|
||
@pytest.mark.skipif(platform.system() == "Windows", reason="Uses symlinks") | ||
def test_custom_symlinked_home_config_install(): | ||
base_cache = temp_folder() | ||
real_cache = os.path.join(base_cache, "real_cache") | ||
os.makedirs(real_cache) | ||
symlink_cache = os.path.join(base_cache, "symlink_cache") | ||
os.symlink(real_cache, symlink_cache) | ||
origin_folder = temp_folder() | ||
save(os.path.join(origin_folder, "myfile.txt"), "some contents") | ||
create_local_git_repo(folder=origin_folder) | ||
c = TestClient(cache_folder=symlink_cache) | ||
c.run(f'config install "{origin_folder}" --type=git') | ||
assert "Copying file myfile.txt to" in c.out |