diff options
author | 2025-02-12 22:16:51 -0800 | |
---|---|---|
committer | 2025-02-12 22:16:51 -0800 | |
commit | 8ea2abcb0ff0f2e23391dbde621d62c0980138e7 (patch) | |
tree | 4d421d8fcaea1914cf782421676fbb0da48af277 /java/dexpreopt_test.go | |
parent | 421ced81177c558d9b03c958cc78493874e27a25 (diff) | |
parent | 4a80748e09ff307c3052fbb36ac38880fd5d2340 (diff) |
Merge "Don't panic in ModuleForTests and friends" into main am: 4a80748e09
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3490133
Change-Id: I2057f531f5d40d61410ce97547d04b6840c4e800
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'java/dexpreopt_test.go')
-rw-r--r-- | java/dexpreopt_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/dexpreopt_test.go b/java/dexpreopt_test.go index bf660475f..f437da02c 100644 --- a/java/dexpreopt_test.go +++ b/java/dexpreopt_test.go @@ -239,7 +239,7 @@ func TestDexpreoptEnabled(t *testing.T) { variant += "_apex1000" } - dexpreopt := ctx.ModuleForTests(moduleName, variant).MaybeRule("dexpreopt") + dexpreopt := ctx.ModuleForTests(t, moduleName, variant).MaybeRule("dexpreopt") enabled := dexpreopt.Rule != nil if enabled != test.enabled { @@ -325,7 +325,7 @@ func TestApexSystemServerDexpreoptInstalls(t *testing.T) { sdk_version: "current", }`) ctx := result.TestContext - module := ctx.ModuleForTests("service-foo", "android_common_apex1000") + module := ctx.ModuleForTests(t, "service-foo", "android_common_apex1000") library := module.Module().(*Library) installs := library.dexpreopter.ApexSystemServerDexpreoptInstalls() @@ -367,7 +367,7 @@ func TestApexSystemServerDexpreoptInstalls(t *testing.T) { sdk_version: "current", }`) ctx = result.TestContext - module = ctx.ModuleForTests("foo", "android_common") + module = ctx.ModuleForTests(t, "foo", "android_common") library = module.Module().(*Library) installs = library.dexpreopter.ApexSystemServerDexpreoptInstalls() @@ -396,7 +396,7 @@ func TestGenerateProfileEvenIfDexpreoptIsDisabled(t *testing.T) { }`) ctx := result.TestContext - dexpreopt := ctx.ModuleForTests("foo", "android_common").MaybeRule("dexpreopt") + dexpreopt := ctx.ModuleForTests(t, "foo", "android_common").MaybeRule("dexpreopt") expected := []string{"out/soong/.intermediates/foo/android_common/dexpreopt/foo/profile.prof"} |