summaryrefslogtreecommitdiff
path: root/testsuite.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-08-25 07:21:02 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-08-25 19:23:22 +0200
commit20de53b6a29fcfd2d91e815c5698b9b806a908f4 (patch)
tree6b32937e5d560faef8b785705579a86cfec4975a /testsuite.py
parentdbd9c59a4de57089de9f39d38e451ce8e6a869ba (diff)
Add a Kconfig.kconfig_filenames attribute
Kconfig.kconfig_filenames is an ordered list of all Kconfig files included in the configuration, relative to $srctree. Can be used e.g. for custom incremental build implementations, though sync_deps() already indirectly catches any relevant changes to files. Piggyback some ' -> " quote style consistency cleanups.
Diffstat (limited to 'testsuite.py')
-rw-r--r--testsuite.py33
1 files changed, 25 insertions, 8 deletions
diff --git a/testsuite.py b/testsuite.py
index 1c49209..4faed1f 100644
--- a/testsuite.py
+++ b/testsuite.py
@@ -978,7 +978,8 @@ g
""")
- print("Testing locations and source/rsource/gsource/grsource")
+ print("Testing locations, source/rsource/gsource/grsource, and "
+ "Kconfig.kconfig_filenames")
def verify_locations(nodes, *expected_locs):
verify(len(nodes) == len(expected_locs),
@@ -1034,6 +1035,22 @@ g
verify_locations([c.syms["COMMENT_HOOK"].nodes[0].next],
"tests/Klocation_sourced:18")
+ # Test Kconfig.kconfig_filenames
+
+ verify_equal(c.kconfig_filenames, [
+ "tests/Klocation",
+ "tests/Klocation_sourced",
+ "tests/sub/Klocation_rsourced",
+ "tests/sub/Klocation_gsourced1",
+ "tests/sub/Klocation_gsourced2",
+ "tests/sub/Klocation_gsourced1",
+ "tests/sub/Klocation_gsourced2",
+ "tests/sub/Klocation_grsourced1",
+ "tests/sub/Klocation_grsourced2",
+ "tests/sub/Klocation_grsourced1",
+ "tests/sub/Klocation_grsourced2"
+ ])
+
# Test recursive 'source' detection
try:
@@ -1134,18 +1151,18 @@ tests/Krecursive2:1
verify_sym_path("ONE_DOWN", 5, ("Kinclude_path", 9))
verify_sym_path("TWO_DOWN", 0,
- ('Kinclude_path', 4), ('Kinclude_path_sourced_1', 4))
+ ("Kinclude_path", 4), ("Kinclude_path_sourced_1", 4))
verify_sym_path("TWO_DOWN", 1,
- ('Kinclude_path', 4), ('Kinclude_path_sourced_1', 9))
+ ("Kinclude_path", 4), ("Kinclude_path_sourced_1", 9))
verify_sym_path("TWO_DOWN", 2,
- ('Kinclude_path', 9), ('Kinclude_path_sourced_1', 4))
+ ("Kinclude_path", 9), ("Kinclude_path_sourced_1", 4))
verify_sym_path("TWO_DOWN", 3,
- ('Kinclude_path', 9), ('Kinclude_path_sourced_1', 9))
+ ("Kinclude_path", 9), ("Kinclude_path_sourced_1", 9))
verify_node_path(c.top_node)
- verify_node_path(c.menus[0], ('Kinclude_path', 4), ('Kinclude_path_sourced_1', 4))
- verify_node_path(c.comments[0], ('Kinclude_path', 4), ('Kinclude_path_sourced_1', 4))
- verify_node_path(c.choices[0].nodes[0], ('Kinclude_path', 4), ('Kinclude_path_sourced_1', 4))
+ verify_node_path(c.menus[0], ("Kinclude_path", 4), ("Kinclude_path_sourced_1", 4))
+ verify_node_path(c.comments[0], ("Kinclude_path", 4), ("Kinclude_path_sourced_1", 4))
+ verify_node_path(c.choices[0].nodes[0], ("Kinclude_path", 4), ("Kinclude_path_sourced_1", 4))
os.environ.pop("srctree", None)