File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
client/toolchain/autotools Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -608,7 +608,9 @@ def test_conf_compiler_executable():
608608
609609
610610def test_autotools_toolchain_conf_extra_configure_args ():
611- """Validate that tools.gnu:extra_configure_args are passed to configure command only
611+ """Validate that tools.gnu:extra_configure_args are passed to configure command only.
612+
613+ The configure args should be passed as list only.
612614 """
613615 f = temp_folder ()
614616 os .chdir (f )
@@ -623,3 +625,9 @@ def test_autotools_toolchain_conf_extra_configure_args():
623625 assert "--foo --bar" in obj ["configure_args" ]
624626 # make sure it does not forward to make
625627 assert "--foo" not in obj ["make_args" ]
628+
629+ conanfile .conf .define ("tools.gnu:extra_configure_args" , "--foo --bar" )
630+ with pytest .raises (ConanException ) as expected :
631+ AutotoolsToolchain (conanfile )
632+ assert "[conf] tools.gnu:extra_configure_args must be a list-like object. " \
633+ "The value '--foo --bar' introduced is a str object" in str (expected )
Original file line number Diff line number Diff line change @@ -240,6 +240,7 @@ def test_crossbuild_to_android(build_env_mock):
240240def test_gnu_toolchain_conf_extra_configure_args ():
241241 """ Validate that tools.gnu:extra_configure_args are passed to the configure_args when
242242 building with GnuToolchain.
243+ The configure args should be passed as a list-like object.
243244 """
244245 conanfile = ConanFileMock ()
245246 conanfile .settings = MockSettings ({"os" : "Linux" , "arch" : "x86_64" })
@@ -249,3 +250,9 @@ def test_gnu_toolchain_conf_extra_configure_args():
249250 tc = GnuToolchain (conanfile )
250251 assert tc .configure_args ["--foo" ] is None
251252 assert tc .configure_args ["--bar" ] is None
253+
254+ conanfile .conf .define ("tools.gnu:extra_configure_args" , "--foo --bar" )
255+ with pytest .raises (ConanException ) as expected :
256+ GnuToolchain (conanfile )
257+ assert "[conf] tools.gnu:extra_configure_args must be a list-like object. " \
258+ "The value '--foo --bar' introduced is a str object" in str (expected )
You can’t perform that action at this time.
0 commit comments