From 699fd81bf3a67606396035697357c5665dcd68af Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Fri, 26 Oct 2018 22:23:27 +0200 Subject: Support enabling the assignment-to-undef. symbol warning via the environment This makes it possible to enable it for the bundled tools, by setting KCONFIG_WARN_UNDEF_ASSIGN=y. Previously, the code had to be modified to call Kconfig.enable_undef_warnings(). Also rename KCONFIG_STRICT to KCONFIG_WARN_UNDEF, for consistency. Keep supporting KCONFIG_STRICT as an alias for backwards compatibility. --- testsuite.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'testsuite.py') diff --git a/testsuite.py b/testsuite.py index 644c151..cca5dad 100644 --- a/testsuite.py +++ b/testsuite.py @@ -2518,16 +2518,16 @@ config PRINT_ME_TOO sys.path.pop(0) - print("Testing KCONFIG_STRICT") + print("Testing KCONFIG_WARN_UNDEF") - os.environ["KCONFIG_STRICT"] = "y" - c = Kconfig("Kconfiglib/tests/Kstrict", warn_to_stderr=False) + os.environ["KCONFIG_WARN_UNDEF"] = "y" + c = Kconfig("Kconfiglib/tests/Kundef", warn_to_stderr=False) verify_equal("\n".join(c.warnings), """ -warning: the int symbol INT (defined at Kconfiglib/tests/Kstrict:8) has a non-int range [UNDEF_2 (undefined), 8 (undefined)] +warning: the int symbol INT (defined at Kconfiglib/tests/Kundef:8) has a non-int range [UNDEF_2 (undefined), 8 (undefined)] warning: undefined symbol UNDEF_1: -- Referenced at Kconfiglib/tests/Kstrict:4: +- Referenced at Kconfiglib/tests/Kundef:4: config BOOL bool @@ -2535,7 +2535,7 @@ config BOOL default UNDEF_2 -- Referenced at Kconfiglib/tests/Kstrict:19: +- Referenced at Kconfiglib/tests/Kundef:19: menu "menu" depends on UNDEF_1 @@ -2543,7 +2543,7 @@ menu "menu" warning: undefined symbol UNDEF_2: -- Referenced at Kconfiglib/tests/Kstrict:4: +- Referenced at Kconfiglib/tests/Kundef:4: config BOOL bool @@ -2551,7 +2551,7 @@ config BOOL default UNDEF_2 -- Referenced at Kconfiglib/tests/Kstrict:8: +- Referenced at Kconfiglib/tests/Kundef:8: config INT int @@ -2561,14 +2561,14 @@ config INT warning: undefined symbol UNDEF_3: -- Referenced at Kconfiglib/tests/Kstrict:19: +- Referenced at Kconfiglib/tests/Kundef:19: menu "menu" depends on UNDEF_1 visible if UNDEF_3 """[1:]) - os.environ.pop("KCONFIG_STRICT") + os.environ.pop("KCONFIG_WARN_UNDEF") print("\nAll selftests passed\n" if all_passed else -- cgit v1.2.3