Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/powershell on linux #7408

Merged
merged 5 commits into from Jul 24, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions conans/client/generators/virtualenv.py
Expand Up @@ -25,8 +25,8 @@ def content(self):
if os_info.is_windows and not os_info.is_posix:
result.update(env_files(self.env, self.append_with_spaces, BAT_FLAVOR, self.output_path,
self.suffix, self.venv_name))
result.update(env_files(self.env, self.append_with_spaces, PS1_FLAVOR, self.output_path,
self.suffix, self.venv_name))
result.update(env_files(self.env, self.append_with_spaces, PS1_FLAVOR, self.output_path,
self.suffix, self.venv_name))
result.update(env_files(self.env, self.append_with_spaces, SH_FLAVOR, self.output_path,
self.suffix, self.venv_name))
return result
6 changes: 3 additions & 3 deletions conans/test/functional/generators/generators_test.py
Expand Up @@ -41,10 +41,10 @@ def test_base(self):
client.save(files)
client.run("install . --build")

venv_files = ["activate.sh", "deactivate.sh", "environment.sh.env"]
venv_files = ["activate.sh", "deactivate.sh", "environment.sh.env",
"activate.ps1", "deactivate.ps1", "environment.ps1.env"]
if platform.system() == "Windows":
venv_files.extend(["activate.bat", "deactivate.bat", "environment.bat.env",
"activate.ps1", "deactivate.ps1", "environment.ps1.env"])
venv_files.extend(["activate.bat", "deactivate.bat", "environment.bat.env"])

self.assertEqual(sorted(['conanfile.txt', 'conaninfo.txt', 'conanbuildinfo.cmake',
'conanbuildinfo.gcc', 'conanbuildinfo.qbs', 'conanbuildinfo.pri',
Expand Down
6 changes: 2 additions & 4 deletions conans/test/functional/generators/virtualenv_test.py
Expand Up @@ -8,7 +8,7 @@
from parameterized.parameterized import parameterized_class

from conans.client.generators.virtualenv import VirtualEnvGenerator
from conans.client.tools import OSInfo
from conans.client.tools import OSInfo, files as tools_files
from conans.client.tools.env import environment_append
from conans.model.ref import ConanFileReference
from conans.test.functional.graph.graph_manager_base import GraphManagerTest
Expand Down Expand Up @@ -110,9 +110,7 @@ class PowerShellCommands(object):

@property
def skip(self):
# Change to this once support for PowreShell Core is in place.
# skip = not (os_info.is_windows or which("pwsh"))
return (not os_info.is_windows) or os_info.is_posix
return not (os_info.is_windows or tools_files.which("pwsh"))


class WindowsCmdCommands(object):
Expand Down
Expand Up @@ -24,10 +24,10 @@ def setUpClass(cls):
cls.result = cls.generator.content

def test_output(self):
keys = ["deactivate_build.sh", "activate_build.sh", "environment_build.sh.env"]
keys = ["deactivate_build.sh", "activate_build.sh", "environment_build.sh.env",
"activate_build.ps1", "deactivate_build.ps1", "environment_build.ps1.env"]
if platform.system() == "Windows":
keys += ["activate_build.bat", "deactivate_build.bat", "environment_build.bat.env",
"activate_build.ps1", "deactivate_build.ps1", "environment_build.ps1.env"]
keys += ["activate_build.bat", "deactivate_build.bat", "environment_build.bat.env"]

self.assertListEqual(sorted(keys), sorted(self.result.keys()))

Expand Down
6 changes: 3 additions & 3 deletions conans/test/unittests/client/generators/virtualenv_test.py
Expand Up @@ -33,10 +33,10 @@ def setUpClass(cls):
cls.result = cls.generator.content

def test_output(self):
keys = ["deactivate.sh", "activate.sh", 'environment.sh.env']
keys = ["deactivate.sh", "activate.sh", "environment.sh.env",
"activate.ps1", "deactivate.ps1", "environment.ps1.env"]
if platform.system() == "Windows":
keys += ["activate.bat", "deactivate.bat", "environment.bat.env",
"activate.ps1", "deactivate.ps1", "environment.ps1.env"]
keys += ["activate.bat", "deactivate.bat", "environment.bat.env"]

self.assertListEqual(sorted(keys), sorted(self.result.keys()))

Expand Down
6 changes: 3 additions & 3 deletions conans/test/unittests/client/generators/virtualrunenv_test.py
Expand Up @@ -27,10 +27,10 @@ def setUpClass(cls):
cls.result = cls.generator.content

def test_output(self):
keys = ["deactivate_run.sh", "activate_run.sh", self.environment_sh_env]
keys = ["deactivate_run.sh", "activate_run.sh", self.environment_sh_env,
"activate_run.ps1", "deactivate_run.ps1", self.environment_ps1_env]
if platform.system() == "Windows":
keys += ["activate_run.bat", "deactivate_run.bat", self.environment_bat_env,
"activate_run.ps1", "deactivate_run.ps1", self.environment_ps1_env]
keys += ["activate_run.bat", "deactivate_run.bat", self.environment_bat_env]

self.assertListEqual(sorted(keys), sorted(self.result.keys()))

Expand Down