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.

Test: m nothing
Bug: 150451422
Change-Id: If36be39b06d6910453649f7c288c2d34f688b2f4
This commit is contained in:
Paul Duffin
2020-02-25 19:26:33 +00:00
parent 109c2add59
commit 1356d8c0f3
10 changed files with 232 additions and 73 deletions

View File

@@ -42,7 +42,7 @@ func TestModuleExportsSnapshot(t *testing.T) {
"package/Android.bp": []byte(packageBp),
})
result.CheckSnapshot("myexports", "android_common", "package",
result.CheckSnapshot("myexports", "package",
checkAndroidBpContents(`
// This is auto-generated. DO NOT EDIT.