summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sasha Smundak <asmundak@google.com> 2021-11-15 13:01:53 -0800
committer Sasha Smundak <asmundak@google.com> 2021-11-18 10:01:37 -0800
commitd679785d0d52526e1f86580072771aabfc466f6c (patch)
tree01bd0882fdb75f712cc7dbca7dd543590775112c
parentcd6c3cd8688eafa684b72ab52fa4b00227b45217 (diff)
Convert dist-for-goals.
Bug: 198496782 Test: internal Change-Id: I64ae938a5809238c18aca272ba73e4328fcb9efe
-rw-r--r--mk2rbc/mk2rbc.go1
-rw-r--r--mk2rbc/mk2rbc_test.go2
2 files changed, 3 insertions, 0 deletions
diff --git a/mk2rbc/mk2rbc.go b/mk2rbc/mk2rbc.go
index b87ab4171..ee6cf792d 100644
--- a/mk2rbc/mk2rbc.go
+++ b/mk2rbc/mk2rbc.go
@@ -102,6 +102,7 @@ var knownFunctions = map[string]struct {
"addsuffix": {baseName + ".addsuffix", starlarkTypeList, hiddenArgNone},
"copy-files": {baseName + ".copy_files", starlarkTypeList, hiddenArgNone},
"dir": {baseName + ".dir", starlarkTypeList, hiddenArgNone},
+ "dist-for-goals": {baseName + ".mkdist_for_goals", starlarkTypeVoid, hiddenArgGlobal},
"enforce-product-packages-exist": {baseName + ".enforce_product_packages_exist", starlarkTypeVoid, hiddenArgNone},
"error": {baseName + ".mkerror", starlarkTypeVoid, hiddenArgNone},
"findstring": {"!findstring", starlarkTypeInt, hiddenArgNone},
diff --git a/mk2rbc/mk2rbc_test.go b/mk2rbc/mk2rbc_test.go
index c2c46543e..41c32d1ea 100644
--- a/mk2rbc/mk2rbc_test.go
+++ b/mk2rbc/mk2rbc_test.go
@@ -689,6 +689,7 @@ $(call enforce-product-packages-exist,)
$(call enforce-product-packages-exist, foo)
$(call require-artifacts-in-path, foo, bar)
$(call require-artifacts-in-path-relaxed, foo, bar)
+$(call dist-for-goals, goal, from:to)
`,
expected: `load("//build/make/core:product_config.rbc", "rblf")
@@ -698,6 +699,7 @@ def init(g, handle):
rblf.enforce_product_packages_exist("foo")
rblf.require_artifacts_in_path("foo", "bar")
rblf.require_artifacts_in_path_relaxed("foo", "bar")
+ rblf.mkdist_for_goals(g, "goal", "from:to")
`,
},
{