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
diff --git a/apex/apex.go b/apex/apex.go
index e268499..f412d86 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -457,6 +457,10 @@
}
}
+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.