GNU Linux-libre 6.8.9-gnu
[releases.git] / scripts / kconfig / tests / no_write_if_dep_unmet / __init__.py
1 # SPDX-License-Identifier: GPL-2.0
2 """
3 Do not write choice values to .config if the dependency is unmet.
4
5 "# CONFIG_... is not set" should not be written into the .config file
6 for symbols with unmet dependency.
7
8 This was not working correctly for choice values because choice needs
9 a bit different symbol computation.
10
11 This checks that no unneeded "# COFIG_... is not set" is contained in
12 the .config file.
13
14 Related Linux commit: cb67ab2cd2b8abd9650292c986c79901e3073a59
15 """
16
17
18 def test(conf):
19     assert conf.oldaskconfig('config', 'n') == 0
20     assert conf.config_matches('expected_config')