aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCole Faust <colefaust@google.com>2023-05-02 10:11:02 -0700
committerCole Faust <colefaust@google.com>2023-05-02 10:11:02 -0700
commit3736374dfe79202923358c7edc145ffec42b6304 (patch)
treedca93f5f8b4d9b9890215f26f416d761f94fac91 /tests
parenta5530711fb063d7faea69be084254c44a6327109 (diff)
downloadbuild-3736374dfe79202923358c7edc145ffec42b6304.tar.gz
Fix whitespace in soong_config_set calls
In make, soong_config_set uses an $(eval) to set it's value, expanding the value of the soong config variable _before_ evaluating the value. Because of this, make will strip trailing whitespace like it does on regular assignments. Make rbcrun match this behavior. Test: ./out/rbcrun ./build/make/tests/run.rbc Change-Id: I907e85cdf50f6fac54331c0d1044f0d53bec22ed
Diffstat (limited to 'tests')
-rw-r--r--tests/product.rbc1
-rw-r--r--tests/run.rbc3
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/product.rbc b/tests/product.rbc
index 9ae6393e8e..b4c6d45ced 100644
--- a/tests/product.rbc
+++ b/tests/product.rbc
@@ -54,6 +54,7 @@ def init(g, handle):
rblf.soong_config_append(g, "NS1", "v2", "def")
rblf.soong_config_set(g, "NS2", "v3", "abc")
rblf.soong_config_set(g, "NS2", "v3", "xyz")
+ rblf.soong_config_set(g, "NS2", "v4", "xyz ")
rblf.mkdist_for_goals(g, "goal", "dir1/file1:out1 dir1/file2:out2")
rblf.mkdist_for_goals(g, "goal", "dir2/file2:")
diff --git a/tests/run.rbc b/tests/run.rbc
index 33583eb3cd..85d6c09bc5 100644
--- a/tests/run.rbc
+++ b/tests/run.rbc
@@ -144,7 +144,8 @@ assert_eq(
"v2": "def"
},
"NS2": {
- "v3": "xyz"
+ "v3": "xyz",
+ "v4": "xyz"
}
},
{k:v for k, v in sorted(ns.items()) }