xref: /linux/scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py (revision e5a52fd2b8cdb700b3c07b030e050a49ef3156b9)
1# SPDX-License-Identifier: GPL-2.0
2"""
3Do 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
6for symbols with unmet dependency.
7
8This was not working correctly for choice values because choice needs
9a bit different symbol computation.
10
11This checks that no unneeded "# COFIG_... is not set" is contained in
12the .config file.
13
14Related Linux commit: cb67ab2cd2b8abd9650292c986c79901e3073a59
15"""
16
17
18def test(conf):
19    assert conf.oldaskconfig('config', 'n') == 0
20    assert conf.config_matches('expected_config')
21