Merge "Make sdk tests more realistic"
This commit is contained in:
commit
e0fc8725f3
3 changed files with 13 additions and 13 deletions
|
@ -82,7 +82,7 @@ const SdkVersionSeparator = '@'
|
|||
func ParseSdkRef(ctx BaseModuleContext, str string, property string) SdkRef {
|
||||
tokens := strings.Split(str, string(SdkVersionSeparator))
|
||||
if len(tokens) < 1 || len(tokens) > 2 {
|
||||
ctx.PropertyErrorf(property, "%q does not follow name#version syntax", str)
|
||||
ctx.PropertyErrorf(property, "%q does not follow name@version syntax", str)
|
||||
return SdkRef{Name: "invalid sdk name", Version: "invalid sdk version"}
|
||||
}
|
||||
|
||||
|
|
|
@ -191,12 +191,12 @@ func TestBasicSdkWithCc(t *testing.T) {
|
|||
|
||||
sdk_snapshot {
|
||||
name: "mysdk@1",
|
||||
native_shared_libs: ["sdkmember_mysdk_1"],
|
||||
native_shared_libs: ["sdkmember_mysdk@1"],
|
||||
}
|
||||
|
||||
sdk_snapshot {
|
||||
name: "mysdk@2",
|
||||
native_shared_libs: ["sdkmember_mysdk_2"],
|
||||
native_shared_libs: ["sdkmember_mysdk@2"],
|
||||
}
|
||||
|
||||
cc_prebuilt_library_shared {
|
||||
|
@ -208,7 +208,7 @@ func TestBasicSdkWithCc(t *testing.T) {
|
|||
}
|
||||
|
||||
cc_prebuilt_library_shared {
|
||||
name: "sdkmember_mysdk_1",
|
||||
name: "sdkmember_mysdk@1",
|
||||
sdk_member_name: "sdkmember",
|
||||
srcs: ["libfoo.so"],
|
||||
system_shared_libs: [],
|
||||
|
@ -221,7 +221,7 @@ func TestBasicSdkWithCc(t *testing.T) {
|
|||
}
|
||||
|
||||
cc_prebuilt_library_shared {
|
||||
name: "sdkmember_mysdk_2",
|
||||
name: "sdkmember_mysdk@2",
|
||||
sdk_member_name: "sdkmember",
|
||||
srcs: ["libfoo.so"],
|
||||
system_shared_libs: [],
|
||||
|
@ -272,8 +272,8 @@ func TestBasicSdkWithCc(t *testing.T) {
|
|||
}
|
||||
`)
|
||||
|
||||
sdkMemberV1 := result.ModuleForTests("sdkmember_mysdk_1", "android_arm64_armv8-a_shared_apex10000_mysdk_1").Rule("toc").Output
|
||||
sdkMemberV2 := result.ModuleForTests("sdkmember_mysdk_2", "android_arm64_armv8-a_shared_apex10000_mysdk_2").Rule("toc").Output
|
||||
sdkMemberV1 := result.ModuleForTests("sdkmember_mysdk@1", "android_arm64_armv8-a_shared_apex10000_mysdk_1").Rule("toc").Output
|
||||
sdkMemberV2 := result.ModuleForTests("sdkmember_mysdk@2", "android_arm64_armv8-a_shared_apex10000_mysdk_2").Rule("toc").Output
|
||||
|
||||
cpplibForMyApex := result.ModuleForTests("mycpplib", "android_arm64_armv8-a_shared_apex10000_mysdk_1")
|
||||
cpplibForMyApex2 := result.ModuleForTests("mycpplib", "android_arm64_armv8-a_shared_apex10000_mysdk_2")
|
||||
|
|
|
@ -83,12 +83,12 @@ func TestBasicSdkWithJavaLibrary(t *testing.T) {
|
|||
|
||||
sdk_snapshot {
|
||||
name: "mysdk@1",
|
||||
java_header_libs: ["sdkmember_mysdk_1"],
|
||||
java_header_libs: ["sdkmember_mysdk@1"],
|
||||
}
|
||||
|
||||
sdk_snapshot {
|
||||
name: "mysdk@2",
|
||||
java_header_libs: ["sdkmember_mysdk_2"],
|
||||
java_header_libs: ["sdkmember_mysdk@2"],
|
||||
}
|
||||
|
||||
java_library {
|
||||
|
@ -100,13 +100,13 @@ func TestBasicSdkWithJavaLibrary(t *testing.T) {
|
|||
}
|
||||
|
||||
java_import {
|
||||
name: "sdkmember_mysdk_1",
|
||||
name: "sdkmember_mysdk@1",
|
||||
sdk_member_name: "sdkmember",
|
||||
host_supported: true,
|
||||
}
|
||||
|
||||
java_import {
|
||||
name: "sdkmember_mysdk_2",
|
||||
name: "sdkmember_mysdk@2",
|
||||
sdk_member_name: "sdkmember",
|
||||
host_supported: true,
|
||||
}
|
||||
|
@ -144,8 +144,8 @@ func TestBasicSdkWithJavaLibrary(t *testing.T) {
|
|||
}
|
||||
`)
|
||||
|
||||
sdkMemberV1 := result.ModuleForTests("sdkmember_mysdk_1", "android_common").Rule("combineJar").Output
|
||||
sdkMemberV2 := result.ModuleForTests("sdkmember_mysdk_2", "android_common").Rule("combineJar").Output
|
||||
sdkMemberV1 := result.ModuleForTests("sdkmember_mysdk@1", "android_common").Rule("combineJar").Output
|
||||
sdkMemberV2 := result.ModuleForTests("sdkmember_mysdk@2", "android_common").Rule("combineJar").Output
|
||||
|
||||
javalibForMyApex := result.ModuleForTests("myjavalib", "android_common_apex10000_mysdk_1")
|
||||
javalibForMyApex2 := result.ModuleForTests("myjavalib", "android_common_apex10000_mysdk_2")
|
||||
|
|
Loading…
Reference in a new issue