From 94c63de77c7a3422347e59e168b05174d0b9e84d Mon Sep 17 00:00:00 2001 From: Sebastian Bøe Date: Mon, 15 Jan 2018 12:46:30 +0100 Subject: Support disabling warnings for redundant assignments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Linux Kernel's merge_config.sh defaults to disabling warnings for redundant assignments and has support for enabling them specifically. This patch reproduces this behaviour in kconfiglib except that we retaing kconfiglib's default behaviour of enabling the warnings. Signed-off-by: Sebastian Bøe --- testsuite.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'testsuite.py') diff --git a/testsuite.py b/testsuite.py index 62a06ab..2f00e2f 100644 --- a/testsuite.py +++ b/testsuite.py @@ -676,7 +676,7 @@ choice print("Testing Kconfig.__repr__()") verify_repr(c, """ - + """) os.environ["srctree"] = "srctree value" @@ -684,10 +684,11 @@ choice c = Kconfig("Kconfiglib/tests/Krepr", warn=False) c.enable_warnings() + c.disable_redun_warnings() c.enable_undef_warnings() verify_repr(c, """ - + """) os.environ.pop("srctree", None) @@ -1816,6 +1817,8 @@ def test_sanity(conf, arch): conf.modules conf.defconfig_list conf.defconfig_filename + conf.enable_redun_warnings() + conf.disable_redun_warnings() conf.enable_undef_warnings() conf.disable_undef_warnings() conf.enable_warnings() -- cgit v1.2.3