summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-12-30 22:59:27 +0900
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-03 10:17:17 +0100
commit997b70f585ef9bf2171c3f435efee3967e3036ec (patch)
treed55e7840d814f39c7c5aa532790e96d90c075b32 /scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py
parent273dbe5f87de8d6129a68ad40e87922fb6e783b6 (diff)
downloadbarebox-997b70f585ef9bf2171c3f435efee3967e3036ec.tar.gz
barebox-997b70f585ef9bf2171c3f435efee3967e3036ec.tar.xz
kconfig: sync to Linux 4.20
The previous sync was commit 18895514dc5e ("kconfig: update to v3.18-rc6"). Some commits were applied on top of that since then, but equivalent fixups were done in Linux. So, this commit overwrites everything scripts/kconfig/ with the one from Linux 4.20 Highlights: - 'silentoldconfig' has been renamed to 'syncconfig' (the top Makefile needs to be adjusted) - 'testconfig' target has been added for unit-tests (the top Makefile needs to export PYTHON3 because the test frame relies on Python3 and pytest) - The perfect hash table generated by gperf has been removed - The localization support has been removed - The 'option env=VAR' has been replaced with more generic variable reference syntax $(VAR) (./Kconfig and common/Kconfig need to be adjusted) Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py')
-rw-r--r--scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py b/scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py
new file mode 100644
index 0000000000..207261b0fe
--- /dev/null
+++ b/scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py
@@ -0,0 +1,19 @@
+"""
+Do not write choice values to .config if the dependency is unmet.
+
+"# CONFIG_... is not set" should not be written into the .config file
+for symbols with unmet dependency.
+
+This was not working correctly for choice values because choice needs
+a bit different symbol computation.
+
+This checks that no unneeded "# COFIG_... is not set" is contained in
+the .config file.
+
+Related Linux commit: cb67ab2cd2b8abd9650292c986c79901e3073a59
+"""
+
+
+def test(conf):
+ assert conf.oldaskconfig('config', 'n') == 0
+ assert conf.config_matches('expected_config')