diff options
author | Paul Duffin <paulduffin@google.com> | 2021-03-22 17:31:52 +0000 |
---|---|---|
committer | Paul Duffin <paulduffin@google.com> | 2021-03-24 01:07:12 +0000 |
commit | b148a49319b4c98d29dba0dc024347413c301856 (patch) | |
tree | 93791e95a49e28d96242952838c8a7aa50f2d5e1 /java/kotlin_test.go | |
parent | 414ea5eb73acf15c37e3e3057f903e73cd3e2094 (diff) |
Remove uses of buildDir from java/kotlin_test.go
Remove any uses, either direct (or indirect via testJavaConfig or
similar methods), of the package level buildDir variable from this
file.
Bug: 182885307
Test: m nothing
Change-Id: Id1d449d55fe992ebc3d7bad38a76bb1652844f52
Diffstat (limited to 'java/kotlin_test.go')
-rw-r--r-- | java/kotlin_test.go | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/java/kotlin_test.go b/java/kotlin_test.go index 77ef29456..1c146a192 100644 --- a/java/kotlin_test.go +++ b/java/kotlin_test.go @@ -176,19 +176,22 @@ func TestKapt(t *testing.T) { env := map[string]string{ "RUN_ERROR_PRONE": "true", } - config := testConfig(env, bp, nil) - ctx, _ := testJavaWithConfig(t, config) + + result := android.GroupFixturePreparers( + PrepareForTestWithJavaDefaultModules, + android.FixtureMergeEnv(env), + ).RunTestWithBp(t, bp) buildOS := android.BuildOs.String() - kapt := ctx.ModuleForTests("foo", "android_common").Rule("kapt") + kapt := result.ModuleForTests("foo", "android_common").Rule("kapt") //kotlinc := ctx.ModuleForTests("foo", "android_common").Rule("kotlinc") - javac := ctx.ModuleForTests("foo", "android_common").Description("javac") - errorprone := ctx.ModuleForTests("foo", "android_common").Description("errorprone") + javac := result.ModuleForTests("foo", "android_common").Description("javac") + errorprone := result.ModuleForTests("foo", "android_common").Description("errorprone") - bar := ctx.ModuleForTests("bar", buildOS+"_common").Description("javac").Output.String() - baz := ctx.ModuleForTests("baz", buildOS+"_common").Description("javac").Output.String() - myCheck := ctx.ModuleForTests("my_check", buildOS+"_common").Description("javac").Output.String() + bar := result.ModuleForTests("bar", buildOS+"_common").Description("javac").Output.String() + baz := result.ModuleForTests("baz", buildOS+"_common").Description("javac").Output.String() + myCheck := result.ModuleForTests("my_check", buildOS+"_common").Description("javac").Output.String() // Test that the errorprone plugins are not passed to kapt expectedProcessorPath := "-P plugin:org.jetbrains.kotlin.kapt3:apclasspath=" + bar + |