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
(cherry picked from commit ff9b6faba2
)
Merged-In: I093fbec4e926719b644c64ebfc63f9e3070e28db
This commit is contained in:
committed by
Cherrypicker Worker
parent
ab9fbab7ef
commit
e2c7fd9b8c
@@ -293,6 +293,22 @@ func TestBootclasspathFragment_Test(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
bootclasspath_fragment {
|
||||
name: "test_fragment",
|
||||
contents: ["mysdklibrary"],
|
||||
hidden_api: {
|
||||
split_packages: [],
|
||||
},
|
||||
}
|
||||
|
||||
bootclasspath_fragment {
|
||||
name: "apex.apexd_test_bootclasspath-fragment",
|
||||
contents: ["mysdklibrary"],
|
||||
hidden_api: {
|
||||
split_packages: [],
|
||||
},
|
||||
}
|
||||
|
||||
bootclasspath_fragment_test {
|
||||
name: "a_test_fragment",
|
||||
contents: ["mysdklibrary"],
|
||||
@@ -314,6 +330,12 @@ func TestBootclasspathFragment_Test(t *testing.T) {
|
||||
fragment := result.Module("myfragment", "android_common").(*BootclasspathFragmentModule)
|
||||
android.AssertBoolEquals(t, "not a test fragment", false, fragment.isTestFragment())
|
||||
|
||||
fragment = result.Module("test_fragment", "android_common").(*BootclasspathFragmentModule)
|
||||
android.AssertBoolEquals(t, "is a test fragment by prefix", true, fragment.isTestFragment())
|
||||
|
||||
fragment = result.Module("a_test_fragment", "android_common").(*BootclasspathFragmentModule)
|
||||
android.AssertBoolEquals(t, "is a test fragment by type", true, fragment.isTestFragment())
|
||||
|
||||
fragment = result.Module("apex.apexd_test_bootclasspath-fragment", "android_common").(*BootclasspathFragmentModule)
|
||||
android.AssertBoolEquals(t, "is a test fragment by name", true, fragment.isTestFragment())
|
||||
}
|
||||
|
Reference in New Issue
Block a user