diff options
Diffstat (limited to 'apex')
-rw-r--r-- | apex/androidmk.go | 4 | ||||
-rw-r--r-- | apex/apex.go | 4 | ||||
-rw-r--r-- | apex/apex_test.go | 15 | ||||
-rw-r--r-- | apex/prebuilt.go | 8 |
4 files changed, 13 insertions, 18 deletions
diff --git a/apex/androidmk.go b/apex/androidmk.go index f001fa265..8cca137a0 100644 --- a/apex/androidmk.go +++ b/apex/androidmk.go @@ -149,7 +149,7 @@ func (a *apexBundle) androidMkForFiles(w io.Writer, apexBundleName, apexName, mo var modulePath string if apexType == flattenedApex { // /system/apex/<name>/{lib|framework|...} - modulePath = filepath.Join(a.installDir.ToMakePath().String(), apexBundleName, fi.installDir) + modulePath = filepath.Join(a.installDir.String(), apexBundleName, fi.installDir) fmt.Fprintln(w, "LOCAL_MODULE_PATH :=", modulePath) if a.primaryApexType && !symbolFilesNotNeeded { fmt.Fprintln(w, "LOCAL_SOONG_SYMBOL_PATH :=", pathWhenActivated) @@ -362,7 +362,7 @@ func (a *apexBundle) androidMkForType() android.AndroidMkData { data.Entries.WriteLicenseVariables(w) fmt.Fprintln(w, "LOCAL_MODULE_CLASS := ETC") // do we need a new class? fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", a.outputFile.String()) - fmt.Fprintln(w, "LOCAL_MODULE_PATH :=", a.installDir.ToMakePath().String()) + fmt.Fprintln(w, "LOCAL_MODULE_PATH :=", a.installDir.String()) stemSuffix := apexType.suffix() if a.isCompressed { stemSuffix = imageCapexSuffix diff --git a/apex/apex.go b/apex/apex.go index b7faa5b98..09b6daabd 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -458,10 +458,6 @@ type apexBundle struct { modulePaths []string } -func (*apexBundle) InstallBypassMake() bool { - return true -} - // apexFileClass represents a type of file that can be included in APEX. type apexFileClass int diff --git a/apex/apex_test.go b/apex/apex_test.go index a749ea161..d580d7fd9 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -2657,7 +2657,10 @@ func TestFilesInSubDirWhenNativeBridgeEnabled(t *testing.T) { } func TestVendorApex(t *testing.T) { - ctx := testApex(t, ` + result := android.GroupFixturePreparers( + prepareForApexTest, + android.FixtureModifyConfig(android.SetKatiEnabledForTests), + ).RunTestWithBp(t, ` apex { name: "myapex", key: "myapex.key", @@ -2681,24 +2684,24 @@ func TestVendorApex(t *testing.T) { } `) - ensureExactContents(t, ctx, "myapex", "android_common_myapex_image", []string{ + ensureExactContents(t, result.TestContext, "myapex", "android_common_myapex_image", []string{ "bin/mybin", "lib64/libfoo.so", // TODO(b/159195575): Add an option to use VNDK libs from VNDK APEX "lib64/libc++.so", }) - apexBundle := ctx.ModuleForTests("myapex", "android_common_myapex_image").Module().(*apexBundle) - data := android.AndroidMkDataForTest(t, ctx, apexBundle) + apexBundle := result.ModuleForTests("myapex", "android_common_myapex_image").Module().(*apexBundle) + data := android.AndroidMkDataForTest(t, result.TestContext, apexBundle) name := apexBundle.BaseModuleName() prefix := "TARGET_" var builder strings.Builder data.Custom(&builder, name, prefix, "", data) - androidMk := android.StringRelativeToTop(ctx.Config(), builder.String()) + androidMk := android.StringRelativeToTop(result.Config, builder.String()) installPath := "out/target/product/test_device/vendor/apex" ensureContains(t, androidMk, "LOCAL_MODULE_PATH := "+installPath) - apexManifestRule := ctx.ModuleForTests("myapex", "android_common_myapex_image").Rule("apexManifestRule") + apexManifestRule := result.ModuleForTests("myapex", "android_common_myapex_image").Rule("apexManifestRule") requireNativeLibs := names(apexManifestRule.Args["requireNativeLibs"]) ensureListNotContains(t, requireNativeLibs, ":vndk") } diff --git a/apex/prebuilt.go b/apex/prebuilt.go index 254c90ec0..02d807516 100644 --- a/apex/prebuilt.go +++ b/apex/prebuilt.go @@ -222,7 +222,7 @@ func (p *prebuiltCommon) AndroidMkEntries() []android.AndroidMkEntries { Host_required: p.hostRequired, ExtraEntries: []android.AndroidMkExtraEntriesFunc{ func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) { - entries.SetString("LOCAL_MODULE_PATH", p.installDir.ToMakePath().String()) + entries.SetString("LOCAL_MODULE_PATH", p.installDir.String()) entries.SetString("LOCAL_MODULE_STEM", p.installFilename) entries.SetPath("LOCAL_SOONG_INSTALLED_MODULE", p.installedFile) entries.SetString("LOCAL_SOONG_INSTALL_PAIRS", p.outputApex.String()+":"+p.installedFile.String()) @@ -256,7 +256,7 @@ func (p *prebuiltCommon) createEntriesForApexFile(fi apexFile, apexName string) Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk", ExtraEntries: []android.AndroidMkExtraEntriesFunc{ func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) { - entries.SetString("LOCAL_MODULE_PATH", p.installDir.ToMakePath().String()) + entries.SetString("LOCAL_MODULE_PATH", p.installDir.String()) entries.SetString("LOCAL_SOONG_INSTALLED_MODULE", filepath.Join(p.installDir.String(), fi.stem())) entries.SetString("LOCAL_SOONG_INSTALL_PAIRS", fi.builtFile.String()+":"+filepath.Join(p.installDir.String(), fi.stem())) @@ -472,10 +472,6 @@ type Prebuilt struct { inputApex android.Path } -func (p *Prebuilt) InstallBypassMake() bool { - return true -} - type ApexFileProperties struct { // the path to the prebuilt .apex file to import. // |