Add TestContext parameter to ContentFromFileRuleForTests

The next CL will need a TestContext parameter in
ContentFromFileRuleForTests in order to retrieve the file rule contents
from the Config.  Add it and update all the tests that use it in order
to simply review of the next CL.

Bug: 306029038
Test: go test ./...
Change-Id: Ia4b4c9854017ea3472fa2f8ba42cf7f72720496e
This commit is contained in:
Colin Cross
2023-11-02 16:56:39 -07:00
parent 5c1d5fb21b
commit f61d03d241
13 changed files with 53 additions and 45 deletions

View File

@@ -543,7 +543,7 @@ func TestGenruleHashInputs(t *testing.T) {
for _, test := range testcases {
t.Run(test.name, func(t *testing.T) {
gen := result.ModuleForTests(test.name, "")
manifest := android.RuleBuilderSboxProtoForTests(t, gen.Output("genrule.sbox.textproto"))
manifest := android.RuleBuilderSboxProtoForTests(t, result.TestContext, gen.Output("genrule.sbox.textproto"))
hash := manifest.Commands[0].GetInputHash()
android.AssertStringEquals(t, "hash", test.expectedHash, hash)