diff options
author | 2022-04-12 18:20:14 +0100 | |
---|---|---|
committer | 2022-05-27 16:17:44 +0100 | |
commit | ff9b6faba2b9a949289c70657db87c0b1790cc07 (patch) | |
tree | 6bd0c1d9c830fffef7fb2c26df5aad186ccb8675 /java/bootclasspath_fragment.go | |
parent | c15b9e99e5e208410a1f1c3766c97125e63c22b3 (diff) |
bootclasspath_fragment: Treat some specific modules as test
Treats bootclasspath_fragment modules that have not yet been converted
to test modules as if they were test modules. This is a temporary work
around to ease the migration to bootclasspath_fragment_test modules and
is expected to be reverted.
Bug: 194063708
Test: m nothing
Change-Id: I093fbec4e926719b644c64ebfc63f9e3070e28db
Diffstat (limited to 'java/bootclasspath_fragment.go')
-rw-r--r-- | java/bootclasspath_fragment.go | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go index 11634fabf..b28d70cab 100644 --- a/java/bootclasspath_fragment.go +++ b/java/bootclasspath_fragment.go @@ -827,7 +827,22 @@ func (b *BootclasspathFragmentModule) createHiddenAPIFlagInput(ctx android.Modul // isTestFragment returns true if the current module is a test bootclasspath_fragment. func (b *BootclasspathFragmentModule) isTestFragment() bool { - return b.testFragment + if b.testFragment { + return true + } + + // TODO(b/194063708): Once test fragments all use bootclasspath_fragment_test + // Some temporary exceptions until all test fragments use the + // bootclasspath_fragment_test module type. + name := b.BaseModuleName() + if strings.HasPrefix(name, "test_") { + return true + } + if name == "apex.apexd_test_bootclasspath-fragment" { + return true + } + + return false } // produceHiddenAPIOutput produces the hidden API all-flags.csv file (and supporting files) |