Skip to content

Commit

Permalink
[develop2] undefined settings (#13161)
Browse files Browse the repository at this point in the history
  • Loading branch information
memsharded authored Feb 18, 2023
1 parent 4ee2b23 commit a12e209
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 48 deletions.
48 changes: 0 additions & 48 deletions conans/test/integration/settings/cppstd_test.py

This file was deleted.

31 changes: 31 additions & 0 deletions conans/test/integration/settings/test_non_defining_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import textwrap

from conans.test.utils.tools import TestClient


def test_settings_not_defined_consuming():
c = TestClient()
conanfile = textwrap.dedent("""
from conan import ConanFile
class Pkg(ConanFile):
name = "pkg"
version = "1.0"
settings = "os", "arch"
def build(self):
self.output.info(f"Building with os={self.settings.os}")
self.output.info(f"Building with arch={self.settings.arch}")
def package_id(self):
del self.info.settings.os
del self.info.settings.arch
""")
c.save({"conanfile.py": conanfile,
"profile": ""})
c.run("create . -pr=profile -s os=Windows -s arch=armv8")
assert "Building with os=Windows" in c.out
assert "Building with arch=armv8" in c.out
c.run("install --requires=pkg/1.0 -pr=profile")
# It doesn't fail, even if settings not defined
c.run("install --requires=pkg/1.0 -pr=profile -s os=Linux -s arch=x86")
# It doesn't fail, even if settings different value

0 comments on commit a12e209

Please sign in to comment.