| 1 | |
| 2 | |
| 3 | Test optional warnings for user-provided values changed by Kconfig.
|
| 4 |
|
| 5 | Warnings should stay disabled by default, and should only appear when
|
| 6 | KCONFIG_WARN_CHANGED_INPUT is enabled.
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 | def test(conf):
|
| 11 | assert conf.olddefconfig('config') == 0
|
| 12 | assert 'user-provided values changed by Kconfig' not in conf.stderr
|
| 13 |
|
| 14 | assert conf._run_conf('--olddefconfig', dot_config='config',
|
| 15 | extra_env={
|
| 16 | 'KCONFIG_WARN_CHANGED_INPUT': '1',
|
| 17 | }) == 0
|
| 18 | assert conf.stderr_contains('expected_stderr')
|
| 19 | assert conf.config_matches('expected_config')
|
| 20 |
|
| 21 | assert conf._run_conf('--olddefconfig', dot_config='config',
|
| 22 | extra_env={
|
| 23 | 'KCONFIG_WARN_CHANGED_INPUT': '1',
|
| 24 | }, silent=True) == 0
|
| 25 | assert conf.stderr_contains('expected_stderr')
|
| 26 |
|
| 27 | assert conf._run_conf('--savedefconfig=defconfig', dot_config='config',
|
| 28 | out_file='defconfig',
|
| 29 | extra_env={
|
| 30 | 'KCONFIG_WARN_CHANGED_INPUT': '1',
|
| 31 | }) == 0
|
| 32 | assert conf.stderr_contains('expected_stderr')
|
| 33 | assert conf.config_matches('expected_defconfig')
|