Skip to content

Commit

Permalink
Sprinkle some light=True in build_requires tests. From 3s to 1.2 :) (#…
Browse files Browse the repository at this point in the history
…15890)

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

* Remove one that was making Windows unhappy
  • Loading branch information
AbrilRBS authored Mar 18, 2024
1 parent 9635004 commit ea3e4fe
Showing 1 changed file with 13 additions and 13 deletions.
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

0 comments on commit ea3e4fe

Please sign in to comment.