Check the contents of an SDK snapshot's generated Android.bp

Test: m nothing
Bug: 143678475
Change-Id: I407d83c79d6b1ad8082e560726f0bfa7cacab3f0
This commit is contained in:
Paul Duffin
2019-11-26 18:02:20 +00:00
parent 0375dd9a37
commit ac37c503e0
3 changed files with 106 additions and 1 deletions

View File

@@ -249,6 +249,7 @@ func (s *sdk) buildSnapshot(ctx android.ModuleContext) android.OutputPath {
filesToZip: []android.Path{bp.path},
androidBpFile: bp,
}
s.builderForTests = builder
// copy exported AIDL files and stub jar files
javaLibs := s.javaLibs(ctx)
@@ -350,6 +351,10 @@ func (s *sdk) buildSnapshot(ctx android.ModuleContext) android.OutputPath {
return outputZipFile
}
func (s *sdk) GetAndroidBpContentsForTests() string {
return s.builderForTests.androidBpFile.content.String()
}
func buildSharedNativeLibSnapshot(ctx android.ModuleContext, info *nativeLibInfo, builder android.SnapshotBuilder) {
// a function for emitting include dirs
printExportedDirCopyCommandsForNativeLibs := func(lib archSpecificNativeLibInfo) {