Fix printing variables that have inherit references in them
Inherit references (@inherit in make, 1-tuples in starlark) usually appear in list product variables, where they're evaluated before printing. But sometimes they can be copied into a regular global variable, in which case they won't be evaluated before printing. The 1-tuples were failing to print, so adapt them to their make representation before printing. Fixes: 264554449 Test: ./out/rbcrun ./build/make/tests/run.rbc Change-Id: I5ac6eb996c25ee5e77aa26ed5c4b6b6cc31819d1
This commit is contained in:
@@ -28,6 +28,7 @@ load(":board_input_vars.rbc", board_input_vars_init = "init")
|
||||
load("//build/make/tests/single_value_inheritance:test.rbc", test_single_value_inheritance = "test")
|
||||
load("//build/make/tests/artifact_path_requirements:test.rbc", test_artifact_path_requirements = "test")
|
||||
load("//build/make/tests/prefixed_sort_order:test.rbc", test_prefixed_sort_order = "test")
|
||||
load("//build/make/tests/inherits_in_regular_variables:test.rbc", test_inherits_in_regular_variables = "test")
|
||||
|
||||
def assert_eq(expected, actual):
|
||||
if expected != actual:
|
||||
@@ -176,3 +177,4 @@ assert_eq("", g.get("NEWVAR"))
|
||||
test_single_value_inheritance()
|
||||
test_artifact_path_requirements()
|
||||
test_prefixed_sort_order()
|
||||
test_inherits_in_regular_variables()
|
||||
|
Reference in New Issue
Block a user