| Age | Commit message (Collapse) | Author |
|
Previously, $srctree/path/to/defconfig would be looked up before
/path/to/defconfig, and the code wouldn't check if /path/to/defconfig
was an absolute path ($srctree is ignored otherwise). Sloppy old
oversights. The behavior now fully matches the C implementation.
Also fix some related things:
- An 'if m' suffices to select a defconfig. We previously required 'y'.
- Make the code less hacky and possibly more Windows-friendly by using
os.path.relpath() to de-absolutize paths, and stop using
os.path.normpath() as it could change the meaning of paths that
contain symbolic links.
- Explain what happens if 'option defconfig_list' is set on multiple
symbols and print a warning in that case.
- Fix get_srctree(). It would previously return "." instead of None if
$srctree was unset at parse time. Somehow forgot to to test this. The
code is now much more straightforward.
|
|
- Get rid of _sym_str_string(), which was only used here.
- Remove 'if expr is None' case that could never trigger
- Add a test for printing string symbols, as they are a bit tricky:
Default values should not be evaluated to tristate values.
|
|
Previously we would load all arches once in the beginning and reuse them
throughout the test suite. With 36 arches with all symbols evaluated and
cached, this used many gigabytes of memory (unless the test suite was
run with pypy). Restructure things so that we only keep one arch loaded
at a time. This adds some reparsing, but it's not a big deal.
Do an ugly piggy-backing of some code cleanup in the test suite (mostly
using un-numbered {} with format()).
|
|
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.
|
|
Previously, only WEIRD_1 and not WEIRD_2 would be considered not a
choice symbol in the following fragment. This lead to a weird warning in
U-Boot.
choice
config FOO
config WEIRD_1
depends on FOO
if FOO
config WEIRD_2
endif
endchoice
Also add some testcases for weird choice symbols.
|
|
Portable to non-Unix platforms.
|
|
This is like a 'select' that only changes the default value of a symbol,
not limiting what values the user can set it to (with one exception: A
symbol implied to 'y' can't be set to 'm').
Symbol.get_implied_symbols() was added, corresponding to
Symbol.get_selected_symbols(), and Symbol.__str__() was extended to
print implied symbols and weak reverse dependencies. Weak reverse
dependencies are the 'imply' version of 'select's reverse dependencies.
|
|
Mostly to get coverage for _FileFeed.peek_next(), which is only used
while reading the header. The tested behavior probably doesn't make much
sense for .config files and stems from _FileFeed reuse. It's fairly
obscure at least.
|
|
|
|
Redundant, plus we get more coverage for the default state.
|
|
Bit friendlier.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Use python3 if testsuite.py was run with python3, etc.
|
|
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.
|
|
A scientific '$ top -d 0.01' experiment shows it's just waiting around
for the vast majority of those tests.
|
|
|
|
|
|
|
|
The format of the strings isn't set in stone, but it's nice to verify
that nothing changes.
This code was incredibly boring to write. :P
|
|
|
|
|
|
|
|
Only incompatibilities left were itervalues() vs. values() and 'print'
expressions.
|
|
(It was never required if you explicitly passed a 'base_dir', but it's a
bit silly to have to do that too.)
This is a bug. I expected os.path.expandvars() to replace references
non-set environment variables with nothing, but it leaves them as is.
Work around it by letting base_dir = None be special and the default. It
uses $srctree if set and the current directory otherwise. This has the
following advantages:
- It avoids having to reimplement a different version of
os.path.expandvars() and special-casing "" to mean the current
directory.
- It means '$' can appear in paths. (Though it probably never will.)
Maybe the expansion behavior could be removed too, but keep it for now
to be backwards compatible.
|
|
Minor bug due to an early return from load_config(). Piggyback a
refactoring of the code. Reading the header is unlikely to be
performance-sensitive.
Add a testcase too.
|
|
|
|
In preparation for some changes.
|
|
|
|
Also fix a tokenizer nit: a '!' at the end of a line can be tokenized
(though it's meaningless).
|
|
Also add named choices defined in multiple locations to the block at
each location. Not sure why I only added them at the first location
before, as symbols don't work that way.
I still doubt named choices defined in multiple locations will ever be
used.
|
|
|
|
...and mention that the test suite requires the make targets too in the
readme.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|