Check the contents of an SDK snapshot's generated Android.bp
Test: m nothing
Bug: 143678475
Change-Id: I407d83c79d6b1ad8082e560726f0bfa7cacab3f0
diff --git a/sdk/update.go b/sdk/update.go
index 6d7b3ec..e45bd49 100644
--- a/sdk/update.go
+++ b/sdk/update.go
@@ -249,6 +249,7 @@
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 @@
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) {