Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4fcff6d authored by Cole Faust's avatar Cole Faust Committed by Automerger Merge Worker
Browse files

Merge "Allow multiple patterns in rblf_wildcard" am: 598cbbcd

Original change: https://android-review.googlesource.com/c/platform/build/+/1915258

Change-Id: Ib9da4c5eb2ea775fb52b67ee4a6558aee4f0e5dc
parents 608f4bf8 598cbbcd
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -533,7 +533,10 @@ def _require_artifacts_in_path_relaxed(paths, allowed_paths):

def _expand_wildcard(pattern):
    """Expands shell wildcard pattern."""
    return rblf_wildcard(pattern)
    result = []
    for word in __words(pattern):
        result.extend(rblf_wildcard(word))
    return result

def _mkdist_for_goals(g, goal, src_dst_list):
    """Implements dist-for-goals macro."""
+13 −0
Original line number Diff line number Diff line
@@ -59,6 +59,19 @@ assert_eq("foo.c no_folder", rblf.notdir("src/foo.c no_folder"))
assert_eq("", rblf.notdir("/"))
assert_eq("", rblf.notdir(""))

assert_eq(
    ["build/make/tests/board.rbc", "build/make/tests/board_input_vars.rbc"],
    rblf.expand_wildcard("build/make/tests/board*.rbc")
)
assert_eq(
    ["build/make/tests/run.rbc", "build/make/tests/product.rbc"],
    rblf.expand_wildcard("build/make/tests/run.rbc build/make/tests/product.rbc")
)
assert_eq(
    ["build/make/tests/run.rbc"],
    rblf.expand_wildcard("build/make/tests/run.rbc build/make/tests/nonexistent.rbc")
)

(globals, config, globals_base) = rblf.product_configuration("test/device", init, input_variables_init)
assert_eq(
    {