summaryrefslogtreecommitdiff
path: root/sdk/cc_sdk_test.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2019-12-16 17:43:48 +0000
committer Paul Duffin <paulduffin@google.com> 2019-12-31 15:08:59 +0000
commite602918294cdfdb50dd2e9f246808adae932b5ce (patch)
tree44323e23685ac774986b42dc3e88bce5c19d27ab /sdk/cc_sdk_test.go
parent28aa5448843923619cc1295065869477dab5a323 (diff)
Restrict SdkMemberTypes that can be used with sdk/sdk_snapshot
By default SdkMemberTypes are only supported on module_exports module type. Support for sdk module type has to be explicitly specified. The java_header_libs, native_shared_libs and stubs_sources are supported on sdk. The latter is required to provide the stubs source for an API specified in java_header_libs as they should be kept in sync. Bug: 146341462 Test: m nothing Change-Id: I19b9e60792780a797458d4a9e489506602b13144
Diffstat (limited to 'sdk/cc_sdk_test.go')
-rw-r--r--sdk/cc_sdk_test.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/sdk/cc_sdk_test.go b/sdk/cc_sdk_test.go
index f477445fd..255ac08a5 100644
--- a/sdk/cc_sdk_test.go
+++ b/sdk/cc_sdk_test.go
@@ -500,8 +500,8 @@ include/Test.h -> include/include/Test.h
func TestSnapshotWithCcStaticLibrary(t *testing.T) {
result := testSdkWithCc(t, `
- sdk {
- name: "mysdk",
+ module_exports {
+ name: "myexports",
native_static_libs: ["mynativelib"],
}
@@ -520,12 +520,12 @@ func TestSnapshotWithCcStaticLibrary(t *testing.T) {
}
`)
- result.CheckSnapshot("mysdk", "android_common", "",
+ result.CheckSnapshot("myexports", "android_common", "",
checkAndroidBpContents(`
// This is auto-generated. DO NOT EDIT.
cc_prebuilt_library_static {
- name: "mysdk_mynativelib@current",
+ name: "myexports_mynativelib@current",
sdk_member_name: "mynativelib",
export_include_dirs: ["include/include"],
arch: {
@@ -560,9 +560,9 @@ cc_prebuilt_library_static {
system_shared_libs: [],
}
-sdk_snapshot {
- name: "mysdk@current",
- native_static_libs: ["mysdk_mynativelib@current"],
+module_exports_snapshot {
+ name: "myexports@current",
+ native_static_libs: ["myexports_mynativelib@current"],
}
`),
checkAllCopyRules(`
@@ -584,8 +584,8 @@ func TestHostSnapshotWithCcStaticLibrary(t *testing.T) {
SkipIfNotLinux(t)
result := testSdkWithCc(t, `
- sdk {
- name: "mysdk",
+ module_exports {
+ name: "myexports",
device_supported: false,
host_supported: true,
native_static_libs: ["mynativelib"],
@@ -608,12 +608,12 @@ func TestHostSnapshotWithCcStaticLibrary(t *testing.T) {
}
`)
- result.CheckSnapshot("mysdk", "linux_glibc_common", "",
+ result.CheckSnapshot("myexports", "linux_glibc_common", "",
checkAndroidBpContents(`
// This is auto-generated. DO NOT EDIT.
cc_prebuilt_library_static {
- name: "mysdk_mynativelib@current",
+ name: "myexports_mynativelib@current",
sdk_member_name: "mynativelib",
device_supported: false,
host_supported: true,
@@ -652,11 +652,11 @@ cc_prebuilt_library_static {
system_shared_libs: [],
}
-sdk_snapshot {
- name: "mysdk@current",
+module_exports_snapshot {
+ name: "myexports@current",
device_supported: false,
host_supported: true,
- native_static_libs: ["mysdk_mynativelib@current"],
+ native_static_libs: ["myexports_mynativelib@current"],
}
`),
checkAllCopyRules(`