Add [soc|device|product]_specific
Added three properties (soc_specific, device_specific, and product_specific) that shows what a module is specific to. `soc_specific: true` means that the module is specific to an SoC (System-On-a-Chip) and thus need to be installed to vendor partition. This has the same meaning as the old `vendor: true` setting. `device_specific: true` means that the module is specific to the entire hardware configuration of a device includeing the SoC and off-chip peripherals. These modules are installed to odm partition (or /vendor/odm when odm partition does not exist). `product_specific: true` means that the module is specific to the software configuration of a product such as country, network operator, etc. These modules are installed to oem partition (or /system/oem when oem partition does not exist). These modules are assumed to be agnostic to hardware, so this property can't be true when either soc_specific or device_specific is set to true. Bug: 68187740 Test: Build. path_tests amended. Change-Id: I44ff055d87d53b0d2676758c506060de54cbffa0
This commit is contained in:
@@ -246,12 +246,34 @@ func TestPathForModuleInstall(t *testing.T) {
|
||||
ctx: &moduleInstallPathContextImpl{
|
||||
androidBaseContextImpl: androidBaseContextImpl{
|
||||
target: deviceTarget,
|
||||
vendor: true,
|
||||
kind: socSpecificModule,
|
||||
},
|
||||
},
|
||||
in: []string{"bin", "my_test"},
|
||||
out: "target/product/test_device/vendor/bin/my_test",
|
||||
},
|
||||
{
|
||||
name: "odm binary",
|
||||
ctx: &moduleInstallPathContextImpl{
|
||||
androidBaseContextImpl: androidBaseContextImpl{
|
||||
target: deviceTarget,
|
||||
kind: deviceSpecificModule,
|
||||
},
|
||||
},
|
||||
in: []string{"bin", "my_test"},
|
||||
out: "target/product/test_device/odm/bin/my_test",
|
||||
},
|
||||
{
|
||||
name: "oem binary",
|
||||
ctx: &moduleInstallPathContextImpl{
|
||||
androidBaseContextImpl: androidBaseContextImpl{
|
||||
target: deviceTarget,
|
||||
kind: productSpecificModule,
|
||||
},
|
||||
},
|
||||
in: []string{"bin", "my_test"},
|
||||
out: "target/product/test_device/oem/bin/my_test",
|
||||
},
|
||||
|
||||
{
|
||||
name: "system native test binary",
|
||||
@@ -269,7 +291,31 @@ func TestPathForModuleInstall(t *testing.T) {
|
||||
ctx: &moduleInstallPathContextImpl{
|
||||
androidBaseContextImpl: androidBaseContextImpl{
|
||||
target: deviceTarget,
|
||||
vendor: true,
|
||||
kind: socSpecificModule,
|
||||
},
|
||||
inData: true,
|
||||
},
|
||||
in: []string{"nativetest", "my_test"},
|
||||
out: "target/product/test_device/data/nativetest/my_test",
|
||||
},
|
||||
{
|
||||
name: "odm native test binary",
|
||||
ctx: &moduleInstallPathContextImpl{
|
||||
androidBaseContextImpl: androidBaseContextImpl{
|
||||
target: deviceTarget,
|
||||
kind: deviceSpecificModule,
|
||||
},
|
||||
inData: true,
|
||||
},
|
||||
in: []string{"nativetest", "my_test"},
|
||||
out: "target/product/test_device/data/nativetest/my_test",
|
||||
},
|
||||
{
|
||||
name: "oem native test binary",
|
||||
ctx: &moduleInstallPathContextImpl{
|
||||
androidBaseContextImpl: androidBaseContextImpl{
|
||||
target: deviceTarget,
|
||||
kind: productSpecificModule,
|
||||
},
|
||||
inData: true,
|
||||
},
|
||||
@@ -293,13 +339,37 @@ func TestPathForModuleInstall(t *testing.T) {
|
||||
ctx: &moduleInstallPathContextImpl{
|
||||
androidBaseContextImpl: androidBaseContextImpl{
|
||||
target: deviceTarget,
|
||||
vendor: true,
|
||||
kind: socSpecificModule,
|
||||
},
|
||||
inSanitizerDir: true,
|
||||
},
|
||||
in: []string{"bin", "my_test"},
|
||||
out: "target/product/test_device/data/asan/vendor/bin/my_test",
|
||||
},
|
||||
{
|
||||
name: "sanitized odm binary",
|
||||
ctx: &moduleInstallPathContextImpl{
|
||||
androidBaseContextImpl: androidBaseContextImpl{
|
||||
target: deviceTarget,
|
||||
kind: deviceSpecificModule,
|
||||
},
|
||||
inSanitizerDir: true,
|
||||
},
|
||||
in: []string{"bin", "my_test"},
|
||||
out: "target/product/test_device/data/asan/odm/bin/my_test",
|
||||
},
|
||||
{
|
||||
name: "sanitized oem binary",
|
||||
ctx: &moduleInstallPathContextImpl{
|
||||
androidBaseContextImpl: androidBaseContextImpl{
|
||||
target: deviceTarget,
|
||||
kind: productSpecificModule,
|
||||
},
|
||||
inSanitizerDir: true,
|
||||
},
|
||||
in: []string{"bin", "my_test"},
|
||||
out: "target/product/test_device/data/asan/oem/bin/my_test",
|
||||
},
|
||||
|
||||
{
|
||||
name: "sanitized system native test binary",
|
||||
@@ -318,7 +388,33 @@ func TestPathForModuleInstall(t *testing.T) {
|
||||
ctx: &moduleInstallPathContextImpl{
|
||||
androidBaseContextImpl: androidBaseContextImpl{
|
||||
target: deviceTarget,
|
||||
vendor: true,
|
||||
kind: socSpecificModule,
|
||||
},
|
||||
inData: true,
|
||||
inSanitizerDir: true,
|
||||
},
|
||||
in: []string{"nativetest", "my_test"},
|
||||
out: "target/product/test_device/data/asan/data/nativetest/my_test",
|
||||
},
|
||||
{
|
||||
name: "sanitized odm native test binary",
|
||||
ctx: &moduleInstallPathContextImpl{
|
||||
androidBaseContextImpl: androidBaseContextImpl{
|
||||
target: deviceTarget,
|
||||
kind: deviceSpecificModule,
|
||||
},
|
||||
inData: true,
|
||||
inSanitizerDir: true,
|
||||
},
|
||||
in: []string{"nativetest", "my_test"},
|
||||
out: "target/product/test_device/data/asan/data/nativetest/my_test",
|
||||
},
|
||||
{
|
||||
name: "sanitized oem native test binary",
|
||||
ctx: &moduleInstallPathContextImpl{
|
||||
androidBaseContextImpl: androidBaseContextImpl{
|
||||
target: deviceTarget,
|
||||
kind: productSpecificModule,
|
||||
},
|
||||
inData: true,
|
||||
inSanitizerDir: true,
|
||||
|
Reference in New Issue
Block a user