summaryrefslogtreecommitdiff
path: root/tests/Klocation
AgeCommit message (Collapse)Author
2018-03-13Test grsource with nonexistent fileUlf Magnusson
Just for completeness.
2018-03-13Add a globbing source statementUlf Magnusson
'gsource' works like 'source', but takes a glob pattern and sources all matching files. Works as a no-op if no files match, and hence doubles as an include-if-exists function, similar to '-include' in 'make'. Add a 'grsource' statement as well, mirroring 'rsource'. Came up in https://github.com/ulfalizer/Kconfiglib/pull/40.
2018-02-27Implement 'rsource' statement ('source' with relative path)Roman
The 'rsource' statement works like 'source', but looks relative to the Kconfig file that has the 'rsource' rather than relative to the base Kconfig file. Using 'rsource' makes it possible to move subtrees with Kconfig files around without breaking references to other Kconfig files. So far, this is a Kconfiglib-exclusive feature.
2018-01-28Add some post-parsing warningsUlf Magnusson
These are easiest to check after parsing, since a symbol/choice can be defined in multiple locations: - Warn if a symbol or choice defined without a type. Also warn for choice value symbols defined without a type, even if they automatically get their type from the choice. This feature isn't well-known and probably not used deliberately. - Warn if a choice is defined without a prompt - Warn of a choice default symbol is not contained in the choice Also move _name_and_loc_str() from the symbol class to the global scope and generalize it to be able to handle choices.
2018-01-20Get rid of _next_help_line()Ulf Magnusson
Speeds things up a bit further. Rework the unget handling to save the ungotten line directly instead of using a flag. Add some help texts to tests/Klocation to make sure the line number is updated properly for those.
2017-10-28Add uncommitted test filesUlf Magnusson
2017-10-24Kconfiglib 2 backupUlf Magnusson
WIP
2017-09-20Add support for less/greater than comparisonsUlf Magnusson
Was added upstream in 31847b67 (kconfig: allow use of relations other than (in)equality). Completely unused (and undocumented) in the kernel except for in DEBUG_UART_8250_WORD in arch/arm/Kconfig.debug: depends on DEBUG_UART_8250_SHIFT >= 2 (That line was added before lt/gt support by the way, and assumed a feature that wasn't there.) This change (and the upstream one) also slightly changes how (in)equality comparisons work, making e.g. MY_HEX = 0x00037 evaluate to 'y' if MY_HEX is 0x37. Prior to this change, the strings needed to match exactly.
2015-06-15Report correct locations in the presence of continuation lines.Ulf Magnusson
The line number was previously for logical lines only. Oversight. Get rid of _get_lines() and keep the raw lines in _FileFeed instead, only joining lines with continuation lines as they are fetched. This makes the index correspond to the correct line number from the file. (It also means most lines are returned as-is without any logic applied to them, which is nice.) Litter tests/Klocation with continuation lines to get test coverage. Remove some unused functions that were previously inherited from _Feed and remove it as a base class of _FileFeed.
2012-12-11Make location query selftests more comprehensive.Ulf Magnusson
Also sneak in testing of env. variable expansion, named choices, and 'base_dir'.
2012-12-07Add tests/Klocation.Ulf Magnusson