mirror of
https://github.com/torvalds/linux.git
synced 2026-10-22 23:01:49 +02:00
kconfig: tests: warn_changed_input: Simplify by reusing the extra env
Define the extra environment once and re-use it for the respective _run_conf() calls to increase readability. Reviewed-by: Julian Braha <julianbraha@gmail.com> Signed-off-by: Nicolas Schier <n.schier@fritz.com> Link: https://patch.msgid.link/20260929-kconfig-tests-minor-updates-v2-3-c5902bee1d0c@fritz.com Signed-off-by: Nathan Chancellor <nathan@kernel.org>
This commit is contained in:
parent
09bd92ba15
commit
ecc9c2b15a
|
|
@ -8,26 +8,24 @@ KCONFIG_WARN_CHANGED_INPUT is enabled.
|
|||
|
||||
|
||||
def test(conf):
|
||||
warn_changed_input = {
|
||||
"KCONFIG_WARN_CHANGED_INPUT": "1",
|
||||
}
|
||||
|
||||
assert conf.olddefconfig('config') == 0
|
||||
assert 'user-provided values changed by Kconfig' not in conf.stderr
|
||||
|
||||
assert conf._run_conf('--olddefconfig', dot_config='config',
|
||||
extra_env={
|
||||
'KCONFIG_WARN_CHANGED_INPUT': '1',
|
||||
}) == 0
|
||||
extra_env=warn_changed_input) == 0
|
||||
assert conf.stderr_contains('expected_stderr')
|
||||
assert conf.config_matches('expected_config')
|
||||
|
||||
assert conf._run_conf('--olddefconfig', dot_config='config',
|
||||
extra_env={
|
||||
'KCONFIG_WARN_CHANGED_INPUT': '1',
|
||||
}, silent=True) == 0
|
||||
extra_env=warn_changed_input, silent=True) == 0
|
||||
assert conf.stderr_contains('expected_stderr')
|
||||
|
||||
assert conf._run_conf('--savedefconfig=defconfig', dot_config='config',
|
||||
out_file='defconfig',
|
||||
extra_env={
|
||||
'KCONFIG_WARN_CHANGED_INPUT': '1',
|
||||
}) == 0
|
||||
extra_env=warn_changed_input) == 0
|
||||
assert conf.stderr_contains('expected_stderr')
|
||||
assert conf.config_matches('expected_defconfig')
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user