Build updatable-bcp-packages.txt from prebuilts in sdk snapshot
Previously, the java_import and java_sdk_library_import modules did not
make their permitted_packages available to the rule that generates the
updatable-bcp-packages.txt file. This change corrects that.
Bug: 193763688
Test: m nothing
- Added unit tests, which all failed and then fixed the tests.
Change-Id: If0706e4551a331b48d383123088e63924dded48b
diff --git a/sdk/bootclasspath_fragment_sdk_test.go b/sdk/bootclasspath_fragment_sdk_test.go
index 2f93c84..1d2ab42 100644
--- a/sdk/bootclasspath_fragment_sdk_test.go
+++ b/sdk/bootclasspath_fragment_sdk_test.go
@@ -513,6 +513,12 @@
out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/hiddenapi-monolithic/index-from-classes.csv
snapshot/hiddenapi/index.csv
`, rule)
+
+ // Make sure that the permitted packages from the prebuilts end up in the
+ // updatable-bcp-packages.txt file.
+ rule = module.Output("updatable-bcp-packages.txt")
+ expectedContents := `'mybootlib\nmyothersdklibrary\n'`
+ android.AssertStringEquals(t, "updatable-bcp-packages.txt", expectedContents, rule.Args["content"])
}),
snapshotTestPreparer(checkSnapshotWithSourcePreferred, preparerForSnapshot),
snapshotTestPreparer(checkSnapshotPreferredWithSource, preparerForSnapshot),