summaryrefslogtreecommitdiff
path: root/examples/allnoconfig_simpler.py
AgeCommit message (Collapse)Author
2018-02-06Consistently use 'kconf' instead of 'conf'Ulf Magnusson
The examples had some leftovers from Kconfiglib 1.
2017-11-01Switch to a much faster invalidation algorithmUlf Magnusson
_cached_vis is always calculated as a side effect of calculating any other cached value, and so doubles as a flag for whether an item (symbol or choice) has any cached values. If _cached_vis is None for some item, it also indirectly means that no other item can have any cached values that (actually) depend on the item, because _cached_vis would have gotten calculated as a side effect of calculating any such cached value. Therefore, it's safe to stop recursive invalidation at an item that has _cached_vis None. Huge speedup for the allyes/noconfig*.py scripts. allnoconfig_simpler.py went from 2.671 seconds to 1.067 seconds. The dependency selftests need to be updated too now that _get_dependent() is gone. The kernel defconfig tests pass even if all global invalidation is disabled at least (except for the few defconfigs that don't set MODULES=y), and that's a huge invalidation test. Seems pretty speedy too, even though there's some redundant work, so maybe things could be simplified a bit...
2017-10-30Consistently use 0/1/2 for tristate valuesUlf Magnusson
Easier to work with, allowing e.g. direct comparisons with < and >. Make set_value() take 0, 1, 2 for bool and tristate symbols, and fix other APIs to match. Also: - Add introductions to various concepts in the module docstring. Document some more attributes. Still TODOs. - Rename the Config class to Kconfig. - Escape " and \ in the name of constant symbols when printing them. Also make the (un)escaping 100% consistent with how the C tools do it (\ before non-magic character should be unescaped too). - Clean up the escaping/unescaping code and provide two public escape()/unescape() functions. - Export the original MODULES-independent type in orig_type. It's needed for printing symbols in the reparsable __str__() Kconfig format with just public APIs. - Lots of other minor reorganizing and nits all over.
2017-10-24Kconfiglib 2 backupUlf Magnusson
WIP
2015-03-13Fix examples/allnoconfig.py testsuite hang with v4.0-rc3.Ulf Magnusson
Settings the user value to 'y' does not guarantee that the (actual) value will become 'y', as the symbol's visibility still acts as an upper bound on the value.
2015-03-12Use Symbol.is_allnoconfig_y() in the examplesPhilip Craig
This is required for the 'make allnoconfig' tests.
2012-12-12Re-enable set_user_value() warning for symbols with no prompts.Ulf Magnusson
Disable warnings in allnoconfig_simpler.py instead.
2012-12-11Rename APIs to be more consistent and intuitive.Ulf Magnusson
2012-12-11Include allnoconfig_simpler.py in test suite.Ulf Magnusson
Also update some comments to reflect optimizations.
2012-12-08Add a simpler allnoconfig example.Ulf Magnusson