Output of an apex module type can be included in tests

By implementing SourceFileProducer interface, output of an apex module
can be included in tests (via ':modulename' syntax in 'data' property)

Bug: 120055902
Test: replace apexd_testdata/* with :apex.test in
system/apex/apexd/Android.bp. m apex_file_test.
out/host/linux-x86/nativetest/apex_file_test/ has apex.test.apex in it.

Change-Id: I8b721a68e0edc65a3e674febeed485e06b96bc24
This commit is contained in:
Jiyong Park 2018-11-27 21:27:08 +09:00
parent 055295d18a
commit 74e240be03

View file

@ -457,6 +457,10 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) {
}
}
func (a *apexBundle) Srcs() android.Paths {
return android.Paths{a.outputFiles[imageApex]}
}
func getCopyManifestForNativeLibrary(cc *cc.Module) (fileToCopy android.Path, dirInApex string) {
// Decide the APEX-local directory by the multilib of the library
// In the future, we may query this to the module.