Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
franramirez688 committed Jan 11, 2023
1 parent af8354b commit f5ae45b
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions conans/test/unittests/tools/gnu/autotoolschain_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,19 @@ def test_check_configure_args_overwriting_and_deletion(save_args, cross_building
])
at.generate_args()
configure_args = save_args.call_args[0][0]['configure_args']
assert "'--build=x86_64-linux-gnu'" in configure_args
assert "'--host=wasm32-local-emscripten'" in configure_args
assert "'--with-cross-build=my_path'" in configure_args
assert "'--something-host=my_host'" in configure_args
assert "--build=x86_64-linux-gnu" in configure_args
assert "--host=wasm32-local-emscripten" in configure_args
assert "--with-cross-build=my_path" in configure_args
assert "--something-host=my_host" in configure_args
# https://github.com/conan-io/conan/issues/12431
at.configure_args.remove("--build=x86_64-linux-gnu")
at.configure_args.remove("--host=wasm32-local-emscripten")
at.generate_args()
configure_args = save_args.call_args[0][0]['configure_args']
assert "'--build=x86_64-linux-gnu'" not in configure_args # removed
assert "'--host=wasm32-local-emscripten'" not in configure_args # removed
assert "'--with-cross-build=my_path'" in configure_args
assert "'--something-host=my_host'" in configure_args
assert "--build=x86_64-linux-gnu" not in configure_args # removed
assert "--host=wasm32-local-emscripten" not in configure_args # removed
assert "--with-cross-build=my_path" in configure_args
assert "--something-host=my_host" in configure_args


def test_update_or_prune_any_args(cross_building_conanfile):
Expand All @@ -181,14 +181,14 @@ def test_update_or_prune_any_args(cross_building_conanfile):
"--build": None, # prune value
"--enable-flag1": ""})
new_configure_args = args_to_string(at.configure_args)
assert "'--prefix=/my/other/prefix'" in new_configure_args
assert "'--build=" not in new_configure_args # pruned
assert "'--enable-flag1'" in new_configure_args # flag without value
assert "--prefix=/my/other/prefix" in new_configure_args
assert "--build=" not in new_configure_args # pruned
assert "--enable-flag1" in new_configure_args # flag without value
# Update autoreconf_args
at.update_autoreconf_args({"--force": None})
new_autoreconf_args = args_to_string(at.autoreconf_args)
assert "'--force'" not in new_autoreconf_args
assert "'--force" not in new_autoreconf_args
# Update make_args
at.update_make_args({"--complex-flag": "new-value"})
new_make_args = args_to_string(at.make_args)
assert "'--complex-flag=new-value'" in new_make_args
assert "--complex-flag=new-value" in new_make_args

0 comments on commit f5ae45b

Please sign in to comment.