From daac69dc05217d024fbe021447629fa2b3d95b70 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 13 Mar 2018 03:24:41 +0100 Subject: 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. --- testsuite.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'testsuite.py') 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") -- cgit v1.2.3