diff options
author | 2024-06-20 16:39:25 -0700 | |
---|---|---|
committer | 2024-06-24 11:55:47 -0700 | |
commit | 0cbd3b0e79a438d9ee35c82e52e18acfaeddab3e (patch) | |
tree | eb8abfbaef1ebdab3bd8d1e58f5575b2cd3dc0a1 /rust/test_test.go | |
parent | fe658ac53a137b2666b6109c58d9759305553dc4 (diff) |
Add OutputFilesProvider support for singleton
This CL also changes to use OutputFilesProvider on rust module, which
has singleton involved.
Test: CI
Bug: 339477385
Bug: 348494466
Change-Id: Idc5c0fb9f8425f09184d5b73531ee3052e5a076c
Diffstat (limited to 'rust/test_test.go')
-rw-r--r-- | rust/test_test.go | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/rust/test_test.go b/rust/test_test.go index 6d0ebcf28..dc796c8a4 100644 --- a/rust/test_test.go +++ b/rust/test_test.go @@ -106,12 +106,9 @@ func TestDataLibs(t *testing.T) { ctx := testRust(t, bp) - module := ctx.ModuleForTests("main_test", "android_arm64_armv8-a").Module() - testBinary := module.(*Module).compiler.(*testDecorator) - outputFiles, err := module.(android.OutputFileProducer).OutputFiles("") - if err != nil { - t.Fatalf("Expected rust_test to produce output files, error: %s", err) - } + testingModule := ctx.ModuleForTests("main_test", "android_arm64_armv8-a") + testBinary := testingModule.Module().(*Module).compiler.(*testDecorator) + outputFiles := testingModule.OutputFiles(t, "") if len(outputFiles) != 1 { t.Fatalf("expected exactly one output file. output files: [%s]", outputFiles) } @@ -168,12 +165,10 @@ func TestDataLibsRelativeInstallPath(t *testing.T) { ` ctx := testRust(t, bp) - module := ctx.ModuleForTests("main_test", "android_arm64_armv8-a").Module() + testingModule := ctx.ModuleForTests("main_test", "android_arm64_armv8-a") + module := testingModule.Module() testBinary := module.(*Module).compiler.(*testDecorator) - outputFiles, err := module.(android.OutputFileProducer).OutputFiles("") - if err != nil { - t.Fatalf("Expected rust_test to produce output files, error: %s", err) - } + outputFiles := testingModule.OutputFiles(t, "") if len(outputFiles) != 1 { t.Fatalf("expected exactly one output file. output files: [%s]", outputFiles) } |