Add support for /product-services partition
This is an adaptation of Icc4f8c16bc389fe20db680849f311d02df1299c3, to
support modules that are installed on the /product-services partition.
Bug: 80741439
Test: m -j both with and without enabling the new partition
Change-Id: I72b335ad38baff5848cd3da7489343f8cf98ff16
diff --git a/android/paths_test.go b/android/paths_test.go
index b3dc9de..ff0eeb3 100644
--- a/android/paths_test.go
+++ b/android/paths_test.go
@@ -292,6 +292,17 @@
in: []string{"bin", "my_test"},
out: "target/product/test_device/product/bin/my_test",
},
+ {
+ name: "product-services binary",
+ ctx: &moduleInstallPathContextImpl{
+ androidBaseContextImpl: androidBaseContextImpl{
+ target: deviceTarget,
+ kind: productServicesSpecificModule,
+ },
+ },
+ in: []string{"bin", "my_test"},
+ out: "target/product/test_device/product-services/bin/my_test",
+ },
{
name: "system native test binary",
@@ -342,6 +353,19 @@
},
{
+ name: "product-services native test binary",
+ ctx: &moduleInstallPathContextImpl{
+ androidBaseContextImpl: androidBaseContextImpl{
+ target: deviceTarget,
+ kind: productServicesSpecificModule,
+ },
+ inData: true,
+ },
+ in: []string{"nativetest", "my_test"},
+ out: "target/product/test_device/data/nativetest/my_test",
+ },
+
+ {
name: "sanitized system binary",
ctx: &moduleInstallPathContextImpl{
androidBaseContextImpl: androidBaseContextImpl{
@@ -390,6 +414,19 @@
},
{
+ name: "sanitized product-services binary",
+ ctx: &moduleInstallPathContextImpl{
+ androidBaseContextImpl: androidBaseContextImpl{
+ target: deviceTarget,
+ kind: productServicesSpecificModule,
+ },
+ inSanitizerDir: true,
+ },
+ in: []string{"bin", "my_test"},
+ out: "target/product/test_device/data/asan/product-services/bin/my_test",
+ },
+
+ {
name: "sanitized system native test binary",
ctx: &moduleInstallPathContextImpl{
androidBaseContextImpl: androidBaseContextImpl{
@@ -440,6 +477,19 @@
in: []string{"nativetest", "my_test"},
out: "target/product/test_device/data/asan/data/nativetest/my_test",
},
+ {
+ name: "sanitized product-services native test binary",
+ ctx: &moduleInstallPathContextImpl{
+ androidBaseContextImpl: androidBaseContextImpl{
+ target: deviceTarget,
+ kind: productServicesSpecificModule,
+ },
+ inData: true,
+ inSanitizerDir: true,
+ },
+ in: []string{"nativetest", "my_test"},
+ out: "target/product/test_device/data/asan/data/nativetest/my_test",
+ },
}
for _, tc := range testCases {