From 87f3b24418acb14760ea5faad9ea241c8f7edd33 Mon Sep 17 00:00:00 2001 From: Vishwath Mohan Date: Wed, 7 Jun 2017 12:31:57 -0700 Subject: Fix install path for sanitized native tests. (Soong) This CL fixes a bug with how Soong builds the install path for native tests. Tests are installed in /data/nativetest* by default, but the logic was wrongly redirecting sanitized versions to /data/asan/system/nativetest*. With this fix, they are correctly redirected to /data/asan/data/nativetest* instead. Bug: 37942061 Test: lunch marlin_asan-userdebug && \ SANITIZE_TARGET="address" m -j70 \ # nativetests are generated in /data/asan/data/nativetest* Change-Id: I0c132af5d443151c44219d231770049fddf79bbe --- android/paths.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'android') diff --git a/android/paths.go b/android/paths.go index 26b72d17..aa06127f 100644 --- a/android/paths.go +++ b/android/paths.go @@ -672,15 +672,17 @@ func PathForModuleRes(ctx ModuleContext, pathComponents ...string) ModuleResPath func PathForModuleInstall(ctx ModuleContext, pathComponents ...string) OutputPath { var outPaths []string if ctx.Device() { - partition := "system" + var partition string if ctx.Vendor() { partition = ctx.DeviceConfig().VendorPath() + } else if ctx.InstallInData() { + partition = "data" + } else { + partition = "system" } if ctx.InstallInSanitizerDir() { partition = "data/asan/" + partition - } else if ctx.InstallInData() { - partition = "data" } outPaths = []string{"target", "product", ctx.AConfig().DeviceName(), partition} } else { -- cgit v1.2.3