File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
conans/test/integration/toolchains/gnu Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ import os
2+ import textwrap
3+
4+ from conans .test .utils .tools import TestClient
5+ from conans .util .files import load
6+
7+
8+ def test_autotools_custom_environment ():
9+ client = TestClient ()
10+ conanfile = textwrap .dedent ("""
11+ from conan import ConanFile
12+ from conan.tools.gnu import AutotoolsToolchain
13+
14+ class Conan(ConanFile):
15+ settings = "os"
16+ def generate(self):
17+ at = AutotoolsToolchain(self)
18+ env = at.environment()
19+ env.define("FOO", "BAR")
20+ at.generate(env)
21+ """ )
22+
23+ client .save ({"conanfile.py" : conanfile })
24+ client .run ("install . -sh:os=Linux" )
25+ content = load (os .path .join (client .current_folder , "conanautotoolstoolchain.sh" ))
26+ assert 'export FOO="BAR"' in content
You can’t perform that action at this time.
0 commit comments