diff options
| author | Anton Hansson <hansson@google.com> | 2019-10-03 14:18:45 +0100 |
|---|---|---|
| committer | Anton Hansson <hansson@google.com> | 2019-10-03 14:21:30 +0100 |
| commit | 43ab0bc24a3c20830e49561b4372f4a544bdf56f (patch) | |
| tree | 44439a31b108bb79de9681859534aa2faaaa40a7 /dexpreopt | |
| parent | a9e13f785f47b630f73af25603d80183a0444bf2 (diff) | |
| download | build_soong-43ab0bc24a3c20830e49561b4372f4a544bdf56f.tar.gz build_soong-43ab0bc24a3c20830e49561b4372f4a544bdf56f.tar.bz2 build_soong-43ab0bc24a3c20830e49561b4372f4a544bdf56f.zip | |
Add partition subdirs to system_other
...and move odex/vdex files into the dir corresponding to their
source app's partition.
Bug: 141707536
Test: soong unit test
Test: lunch aosp_blueline && m
Change-Id: I90a7a6c97e0eb2706951a2317a1a65a59ca974fa
Diffstat (limited to 'dexpreopt')
| -rw-r--r-- | dexpreopt/dexpreopt.go | 2 | ||||
| -rw-r--r-- | dexpreopt/dexpreopt_test.go | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/dexpreopt/dexpreopt.go b/dexpreopt/dexpreopt.go index c378f096..40644a35 100644 --- a/dexpreopt/dexpreopt.go +++ b/dexpreopt/dexpreopt.go @@ -248,7 +248,7 @@ func dexpreoptCommand(ctx android.PathContext, global GlobalConfig, module Modul odexPath := module.BuildPath.InSameDir(ctx, "oat", arch.String(), pathtools.ReplaceExtension(base, "odex")) odexInstallPath := toOdexPath(module.DexLocation) if odexOnSystemOther(module, global) { - odexInstallPath = strings.Replace(odexInstallPath, SystemPartition, SystemOtherPartition, 1) + odexInstallPath = filepath.Join(SystemOtherPartition, odexInstallPath) } vdexPath := odexPath.ReplaceExtension(ctx, "vdex") diff --git a/dexpreopt/dexpreopt_test.go b/dexpreopt/dexpreopt_test.go index 78f2f3fb..aca5e63a 100644 --- a/dexpreopt/dexpreopt_test.go +++ b/dexpreopt/dexpreopt_test.go @@ -117,7 +117,7 @@ func TestDexPreoptSystemOther(t *testing.T) { { patterns: []string{"app/%"}, moduleTests: []moduleTest{ - {module: systemModule, expectedPartition: "system_other"}, + {module: systemModule, expectedPartition: "system_other/system"}, {module: systemProductModule, expectedPartition: "system/product"}, {module: productModule, expectedPartition: "product"}, }, @@ -126,8 +126,8 @@ func TestDexPreoptSystemOther(t *testing.T) { { patterns: []string{"app/%", "product/app/%"}, moduleTests: []moduleTest{ - {module: systemModule, expectedPartition: "system_other"}, - {module: systemProductModule, expectedPartition: "system_other/product"}, + {module: systemModule, expectedPartition: "system_other/system"}, + {module: systemProductModule, expectedPartition: "system_other/system/product"}, {module: productModule, expectedPartition: "product"}, }, }, |
