Support test fixtures in rust package

Replaces the rust specific rustTestCtx mechanism with the general test
fixtures mechanism as converting it to use preparers was not possible.

Also, removes usages of the buildDir variable and removes it as it is
no longer needed.

Bug: 181070625
Test: m nothing
Change-Id: I0176a7b6fb2d390ae23693f1e198da5124b4be63
This commit is contained in:
Paul Duffin
2021-03-07 19:18:38 +00:00
parent e0998ab561
commit 2c4ca8d73f
5 changed files with 73 additions and 141 deletions

View File

@@ -153,7 +153,7 @@ func TestLints(t *testing.T) {
for _, tc := range lintTests {
t.Run("path="+tc.modulePath, func(t *testing.T) {
config := android.TestArchConfig(buildDir, nil, bp, fs)
config := android.TestArchConfig(t.TempDir(), nil, bp, fs)
ctx := CreateTestContext(config)
ctx.Register()
_, errs := ctx.ParseFileList(".", []string{tc.modulePath + "Android.bp"})