Merge "Add test data dependencies to APEX." am: 6109adaee0
am: 5b5cecd94e
Change-Id: I2589597f744dd62d0799f20d7de79dab4e8b07ae
This commit is contained in:
@@ -350,6 +350,19 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
|
||||
symlinkDest := android.PathForModuleOut(ctx, "image"+suffix, symlinkPath).String()
|
||||
copyCommands = append(copyCommands, "ln -sfn "+filepath.Base(destPath)+" "+symlinkDest)
|
||||
}
|
||||
for _, d := range fi.dataPaths {
|
||||
// TODO(eakammer): This is now the third repetition of ~this logic for test paths, refactoring should be possible
|
||||
relPath := d.Rel()
|
||||
dataPath := d.String()
|
||||
if !strings.HasSuffix(dataPath, relPath) {
|
||||
panic(fmt.Errorf("path %q does not end with %q", dataPath, relPath))
|
||||
}
|
||||
|
||||
dataDest := android.PathForModuleOut(ctx, "image"+suffix, fi.apexRelativePath(relPath)).String()
|
||||
|
||||
copyCommands = append(copyCommands, "cp -f "+d.String()+" "+dataDest)
|
||||
implicitInputs = append(implicitInputs, d)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(jiyong): use RuleBuilder
|
||||
@@ -406,6 +419,9 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
|
||||
pathInApex := filepath.Join(f.installDir, f.builtFile.Base())
|
||||
if f.installDir == "bin" || strings.HasPrefix(f.installDir, "bin/") {
|
||||
executablePaths = append(executablePaths, pathInApex)
|
||||
for _, d := range f.dataPaths {
|
||||
readOnlyPaths = append(readOnlyPaths, filepath.Join(f.installDir, d.Rel()))
|
||||
}
|
||||
for _, s := range f.symlinks {
|
||||
executablePaths = append(executablePaths, filepath.Join(f.installDir, s))
|
||||
}
|
||||
|
Reference in New Issue
Block a user