Exclude jacocoagent from boot jars package check

This replicates the previous behavior when the boot jars package check
was performed by a singleton. When the singleton was removed and the
check was performed by the platform-bootclasspath the logic to exclude
jacocoagent from the list was lost. This change replaces it.

Bug: 191377804
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true check-boot-jars
      - fails without this change passes with this change.
Merged-In: If9eae254045bef9a0c0963213721fc12a9f463cb
Change-Id: If9eae254045bef9a0c0963213721fc12a9f463cb
(cherry picked from commit 7f8721618c)
This commit is contained in:
Paul Duffin
2021-06-17 19:33:24 +01:00
parent e11254793d
commit 4fd7dc7de0
2 changed files with 14 additions and 1 deletions

View File

@@ -589,6 +589,19 @@ func (b bootDexJarByModule) bootDexJars() android.Paths {
return paths
}
// bootDexJarsWithoutCoverage returns the boot dex jar paths sorted by their keys without coverage
// libraries if present.
func (b bootDexJarByModule) bootDexJarsWithoutCoverage() android.Paths {
paths := android.Paths{}
for _, k := range android.SortedStringKeys(b) {
if k == "jacocoagent" {
continue
}
paths = append(paths, b[k])
}
return paths
}
// HiddenAPIOutput encapsulates the output from the hidden API processing.
type HiddenAPIOutput struct {
HiddenAPIFlagOutput