CONFIGURATION!
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Test that transitional symbols cannot have properties other than help
|
||||
|
||||
config BAD_DEFAULT
|
||||
bool
|
||||
transitional
|
||||
default y
|
||||
help
|
||||
This transitional symbol illegally has a default property.
|
||||
|
||||
config BAD_PROMPT
|
||||
bool
|
||||
transitional
|
||||
prompt "Bad prompt"
|
||||
help
|
||||
This transitional symbol illegally has a prompt.
|
||||
|
||||
config BAD_SELECT
|
||||
bool
|
||||
transitional
|
||||
select OTHER_SYMBOL
|
||||
help
|
||||
This transitional symbol illegally has a select.
|
||||
|
||||
config BAD_IMPLY
|
||||
bool
|
||||
transitional
|
||||
imply OTHER_SYMBOL
|
||||
help
|
||||
This transitional symbol illegally has an imply.
|
||||
|
||||
config BAD_DEPENDS
|
||||
bool
|
||||
transitional
|
||||
depends on OTHER_SYMBOL
|
||||
help
|
||||
This transitional symbol illegally has a depends.
|
||||
|
||||
config BAD_RANGE
|
||||
int
|
||||
transitional
|
||||
range 1 10
|
||||
help
|
||||
This transitional symbol illegally has a range.
|
||||
|
||||
config BAD_NO_TYPE
|
||||
transitional
|
||||
help
|
||||
This transitional symbol illegally has no type specified.
|
||||
|
||||
config OTHER_SYMBOL
|
||||
bool
|
||||
@@ -0,0 +1,14 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
"""
|
||||
Test that transitional symbols with invalid properties are rejected.
|
||||
|
||||
Transitional symbols can only have help sections. Any other properties
|
||||
(default, select, depends, etc.) should cause a parser error.
|
||||
"""
|
||||
|
||||
def test(conf):
|
||||
# This should fail with exit code 1 due to invalid transitional symbol
|
||||
assert conf.olddefconfig() == 1
|
||||
|
||||
# Check that the error message is about transitional symbols
|
||||
assert conf.stderr_contains('expected_stderr')
|
||||
@@ -0,0 +1,7 @@
|
||||
Kconfig:46:warning: config symbol defined without type
|
||||
Kconfig:7: error: transitional symbols can only have help sections
|
||||
Kconfig:14: error: transitional symbols can only have help sections
|
||||
Kconfig:21: error: transitional symbols can only have help sections
|
||||
Kconfig:28: error: transitional symbols can only have help sections
|
||||
Kconfig:32: error: transitional symbols can only have help sections
|
||||
Kconfig:42: error: transitional symbols can only have help sections
|
||||
Reference in New Issue
Block a user