diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-03 19:28:01 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-03 19:28:01 -0400 |
| commit | 147a89bc71e7db40f011454a40add7ff2d10f8d8 (patch) | |
| tree | 72f2f1355c6121c40124206c7d4ac82632f1690d /scripts/kconfig/tests/choice/__init__.py | |
| parent | 3b24b83763e72a6c1e728100104fd99aa83a7b3b (diff) | |
| parent | 18492685e479fd4d8e1dca836f57c11b6800f083 (diff) | |
Merge tag 'kconfig-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kconfig updates from Masahiro Yamada:
- improve checkpatch for more precise Kconfig code checking
- clarify effective selects by grouping reverse dependencies in help
- do not write out '# CONFIG_FOO is not set' from invisible symbols
- make oldconfig as silent as it should be
- rename 'silentoldconfig' to 'syncconfig'
- add unit-test framework and several test cases
- warn unmet dependency of tristate symbols
- make unmet dependency warnings readable, removing false positives
- improve recursive include detection
- use yylineno to simplify the line number tracking
- misc cleanups
* tag 'kconfig-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (30 commits)
kconfig: use yylineno option instead of manual lineno increments
kconfig: detect recursive inclusion earlier
kconfig: remove duplicated file name and lineno of recursive inclusion
kconfig: do not include both curses.h and ncurses.h for nconfig
kconfig: make unmet dependency warnings readable
kconfig: warn unmet direct dependency of tristate symbols selected by y
kconfig: tests: test if recursive inclusion is detected
kconfig: tests: test if recursive dependencies are detected
kconfig: tests: test randconfig for choice in choice
kconfig: tests: test defconfig when two choices interact
kconfig: tests: check visibility of tristate choice values in y choice
kconfig: tests: check unneeded "is not set" with unmet dependency
kconfig: tests: test if new symbols in choice are asked
kconfig: tests: test automatic submenu creation
kconfig: tests: add basic choice tests
kconfig: tests: add framework for Kconfig unit testing
kbuild: add PYTHON2 and PYTHON3 variables
kconfig: remove redundant streamline_config.pl prerequisite
kconfig: rename silentoldconfig to syncconfig
kconfig: invoke oldconfig instead of silentoldconfig from local*config
...
Diffstat (limited to 'scripts/kconfig/tests/choice/__init__.py')
| -rw-r--r-- | scripts/kconfig/tests/choice/__init__.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/scripts/kconfig/tests/choice/__init__.py b/scripts/kconfig/tests/choice/__init__.py new file mode 100644 index 000000000000..9edcc5262134 --- /dev/null +++ b/scripts/kconfig/tests/choice/__init__.py | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | """ | ||
| 2 | Basic choice tests. | ||
| 3 | |||
| 4 | The handling of 'choice' is a bit complicated part in Kconfig. | ||
| 5 | |||
| 6 | The behavior of 'y' choice is intuitive. If choice values are tristate, | ||
| 7 | the choice can be 'm' where each value can be enabled independently. | ||
| 8 | Also, if a choice is marked as 'optional', the whole choice can be | ||
| 9 | invisible. | ||
| 10 | """ | ||
| 11 | |||
| 12 | |||
| 13 | def test_oldask0(conf): | ||
| 14 | assert conf.oldaskconfig() == 0 | ||
| 15 | assert conf.stdout_contains('oldask0_expected_stdout') | ||
| 16 | |||
| 17 | |||
| 18 | def test_oldask1(conf): | ||
| 19 | assert conf.oldaskconfig('oldask1_config') == 0 | ||
| 20 | assert conf.stdout_contains('oldask1_expected_stdout') | ||
| 21 | |||
| 22 | |||
| 23 | def test_allyes(conf): | ||
| 24 | assert conf.allyesconfig() == 0 | ||
| 25 | assert conf.config_contains('allyes_expected_config') | ||
| 26 | |||
| 27 | |||
| 28 | def test_allmod(conf): | ||
| 29 | assert conf.allmodconfig() == 0 | ||
| 30 | assert conf.config_contains('allmod_expected_config') | ||
| 31 | |||
| 32 | |||
| 33 | def test_allno(conf): | ||
| 34 | assert conf.allnoconfig() == 0 | ||
| 35 | assert conf.config_contains('allno_expected_config') | ||
| 36 | |||
| 37 | |||
| 38 | def test_alldef(conf): | ||
| 39 | assert conf.alldefconfig() == 0 | ||
| 40 | assert conf.config_contains('alldef_expected_config') | ||
