Add CommonOS variant for sdk
Adds a CommonOS variant for sdk that depends on the os specific variants and is used to generate a single sdk for multiple OsTypes, e.g. host linux and android. At the minute the member types only support a single OsType but the basic mechanism for managing the CommonOS variant and collating the variants across all of them is there. The only visible effect of this change is that the location of the generated snapshot is changed, it is no longer os specific and instead is in the same location irrespective of which os it is built for. A lot of tests needed to be changed to specify "common_os" as the variant type instead of the specific os type. As that is the same across all tests it is hard coded in CheckSnapshot method. Bug: 153306490 Test: m nothing Bug: 150451422 Merged-In: If36be39b06d6910453649f7c288c2d34f688b2f4 Change-Id: If36be39b06d6910453649f7c288c2d34f688b2f4
This commit is contained in:
@@ -246,9 +246,12 @@ func (r *testSdkResult) ModuleForTests(name string, variant string) android.Test
|
||||
// Takes a list of functions which check different facets of the snapshot build rules.
|
||||
// Allows each test to customize what is checked without duplicating lots of code
|
||||
// or proliferating check methods of different flavors.
|
||||
func (r *testSdkResult) CheckSnapshot(name string, variant string, dir string, checkers ...snapshotBuildInfoChecker) {
|
||||
func (r *testSdkResult) CheckSnapshot(name string, dir string, checkers ...snapshotBuildInfoChecker) {
|
||||
r.t.Helper()
|
||||
|
||||
// The sdk CommonOS variant is always responsible for generating the snapshot.
|
||||
variant := android.CommonOS.Name
|
||||
|
||||
sdk := r.Module(name, variant).(*sdk)
|
||||
|
||||
snapshotBuildInfo := r.getSdkSnapshotBuildInfo(sdk)
|
||||
|
Reference in New Issue
Block a user