scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py

Source file repositories/reference/linux-study-clean/scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py

File Facts

System
Linux kernel
Corpus path
scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py
Extension
.py
Size
593 bytes
Lines
21
Domain
Support Tooling And Documentation
Bucket
scripts
Inferred role
Support Tooling And Documentation: scripts
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: GPL-2.0
"""
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 "# CONFIG_... 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')

Annotation

Implementation Notes