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

Sprinkle some light=True in build_requires tests. From 3s to 1.2 :) #15890

Merged
Merged
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
26 changes: 13 additions & 13 deletions conans/test/integration/build_requires/build_requires_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def generate(self):


def test_tool_requires_conanfile_txt():
client = TestClient()
client = TestClient(light=True)
client.save({"conanfile.py": GenConanfile()})

build_req = textwrap.dedent("""
Expand All @@ -219,7 +219,7 @@ class BuildReqConan(ConanFile):


def test_profile_override_conflict():
client = TestClient()
client = TestClient(light=True)

test = textwrap.dedent("""
from conan import ConanFile
Expand Down Expand Up @@ -273,7 +273,7 @@ def config_options(self):
def test_conditional_require_context():
""" test that we can condition on the context to define a dependency
"""
c = TestClient()
c = TestClient(light=True)
pkg = textwrap.dedent("""
from conan import ConanFile
class Pkg(ConanFile):
Expand Down Expand Up @@ -301,7 +301,7 @@ def test_overriden_host_but_not_build(self):
will put ``protoc`` from it in the PATH. Not a problem in majority of cases, but not the
cleanest
"""
c = TestClient()
c = TestClient(light=True)
pkg = textwrap.dedent("""
from conan import ConanFile
class ProtoBuf(ConanFile):
Expand Down Expand Up @@ -329,7 +329,7 @@ def test_overriden_host_version(self):
"""
Make the tool_requires follow the regular require with the expression "<host_version>"
"""
c = TestClient()
c = TestClient(light=True)
pkg = textwrap.dedent("""
from conan import ConanFile
class ProtoBuf(ConanFile):
Expand Down Expand Up @@ -365,7 +365,7 @@ def test_overriden_host_version_version_range(self):
"""
same as above, but using version ranges instead of overrides
"""
c = TestClient()
c = TestClient(light=True)
pkg = textwrap.dedent("""
from conan import ConanFile
class ProtoBuf(ConanFile):
Expand Down Expand Up @@ -405,7 +405,7 @@ def test_track_host_error_nothost(self):
"""
if no host requirement is defined, it will be an error
"""
c = TestClient()
c = TestClient(light=True)
c.save({"conanfile.py": GenConanfile().with_build_requirement("protobuf/<host_version>")})
c.run("install .", assert_error=True)
assert "ERROR: require 'protobuf/<host_version>': " \
Expand All @@ -415,7 +415,7 @@ def test_track_host_errors_trait(self):
"""
It is not possible to make host_version visible too
"""
c = TestClient()
c = TestClient(light=True)
pkg = textwrap.dedent("""
from conan import ConanFile
class ProtoBuf(ConanFile):
Expand All @@ -432,7 +432,7 @@ def test_track_host_error_wrong_context(self):
"""
it can only be used by tool_requires, not regular requires
"""
c = TestClient()
c = TestClient(light=True)
c.save({"conanfile.py": GenConanfile("pkg").with_requirement("protobuf/<host_version>")})
c.run(f"install .", assert_error=True)
assert " 'host_version' can only be used for non-visible tool_requires" in c.out
Expand All @@ -441,7 +441,7 @@ def test_host_version_test_package(self):
"""
https://github.com/conan-io/conan/issues/14704
"""
c = TestClient()
c = TestClient(light=True)
pkg = textwrap.dedent("""
from conan import ConanFile
class ProtoBuf(ConanFile):
Expand Down Expand Up @@ -484,7 +484,7 @@ def test_overriden_host_version_transitive_deps(self):
Make the tool_requires follow the regular require with the expression "<host_version>"
for a transitive_deps
"""
c = TestClient()
c = TestClient(light=True)
c.save({"protobuf/conanfile.py": GenConanfile("protobuf"),
"pkg/conanfile.py": GenConanfile("pkg", "0.1").with_requirement("protobuf/[>=1.0]"),
"app/conanfile.py": GenConanfile().with_requires("pkg/0.1")
Expand Down Expand Up @@ -537,7 +537,7 @@ def test_overriden_host_version_user_channel(self, requires_tag, tool_requires_t
"""
Make the tool_requires follow the regular require with the expression "<host_version>"
"""
c = TestClient()
c = TestClient(light=True)
pkg = textwrap.dedent(f"""
from conan import ConanFile
class ProtoBuf(ConanFile):
Expand Down Expand Up @@ -566,7 +566,7 @@ def build_requirements(self):


def test_build_missing_build_requires():
c = TestClient()
c = TestClient(light=True)
c.save({"tooldep/conanfile.py": GenConanfile("tooldep", "0.1"),
"tool/conanfile.py": GenConanfile("tool", "0.1").with_tool_requires("tooldep/0.1"),
"pkg/conanfile.py": GenConanfile("pkg", "0.1").with_tool_requires("tool/0.1"),
Expand Down