summaryrefslogtreecommitdiff
path: root/testsuite.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-03-13 03:24:41 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2018-03-13 05:04:44 +0100
commitdaac69dc05217d024fbe021447629fa2b3d95b70 (patch)
treef2149a160786eeb2919ec1713903bf262a9e6ed0 /testsuite.py
parentaf2935913650dd0517666dcf8a0d4e68f8d62e34 (diff)
Add a globbing source statement
'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.
Diffstat (limited to 'testsuite.py')
-rw-r--r--testsuite.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/testsuite.py b/testsuite.py
index 4b3d0f2..b3f43b4 100644
--- a/testsuite.py
+++ b/testsuite.py
@@ -792,7 +792,7 @@ g
""")
- print("Testing locations and 'source', 'rsource'")
+ print("Testing locations and source/rsource/gsource/grsource")
def verify_locations(nodes, *expected_locs):
verify(len(nodes) == len(expected_locs),
@@ -823,7 +823,11 @@ g
"tests/Klocation:31",
"tests/Klocation_sourced:3",
"tests/sub/Klocation_rsourced:2",
- "tests/Klocation:57")
+ "tests/sub/Klocation_gsourced1:1",
+ "tests/sub/Klocation_gsourced2:1",
+ "tests/sub/Klocation_grsourced1:1",
+ "tests/sub/Klocation_grsourced2:1",
+ "tests/Klocation:77")
verify_locations(c.named_choices["CHOICE"].nodes,
"tests/Klocation_sourced:5")