summaryrefslogtreecommitdiff
path: root/java/app_test.go
diff options
context:
space:
mode:
author Ulya Trafimovich <skvadrik@google.com> 2021-08-12 16:16:11 +0100
committer Ulya Trafimovich <skvadrik@google.com> 2021-08-13 16:10:42 +0100
commitfc0f6e34ce874eba4b1f852c6b9ee92148379768 (patch)
tree06f0f45e9dd54732f772a7c1cd01bad62e15b078 /java/app_test.go
parent8f34b0e19d4bbfee7a904793ffdf17e43988f575 (diff)
Fix the way manifest fixer detects optional <uses-library> entries.
Previously manifest_fixer used a naive way to distiniguish optional libs from required ones: it checked if a library is on the list of optional compatibility libraries. This works for compatibility libs, but not for other libs. Now we properly track optionality through all stages of the build, starting with the addition of the library as a dependency (here's where the `uses_libs`/`optional_uses_libs` distinction kicks in), store it in dependency tag and propagate to class loader context, and from there to the manifest_fixer. The tests have been updated accordingly. Bug: 196377222 Test: lunch bertha_x86_64-userdebug && m droid dist cts mts Change-Id: I3631ce59ebe47116ce7a9b3d33a86f636846ef0f
Diffstat (limited to 'java/app_test.go')
-rw-r--r--java/app_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/java/app_test.go b/java/app_test.go
index 7997f7ad8..8de669146 100644
--- a/java/app_test.go
+++ b/java/app_test.go
@@ -2355,8 +2355,8 @@ func TestUsesLibraries(t *testing.T) {
`--uses-library quuz ` +
`--uses-library foo ` + // TODO(b/132357300): "foo" should not be passed to manifest_fixer
`--uses-library com.non.sdk.lib ` + // TODO(b/132357300): "com.non.sdk.lib" should not be passed to manifest_fixer
- `--uses-library bar ` + // TODO(b/132357300): "bar" should not be passed to manifest_fixer
- `--uses-library runtime-library`
+ `--uses-library runtime-library ` +
+ `--optional-uses-library bar` // TODO(b/132357300): "bar" should not be passed to manifest_fixer
android.AssertStringEquals(t, "manifest_fixer args", expectManifestFixerArgs, actualManifestFixerArgs)
// Test that all libraries are verified (library order matters).