Merge "Add liblog as shared dependency for isolated tests." am: cc9a246063
am: 6373d0fd39
am: 471b91fc72
Change-Id: I581c6036338288f3d756bb94a986c781948dae6f
This commit is contained in:
@@ -210,6 +210,11 @@ func (test *testDecorator) linkerDeps(ctx BaseModuleContext, deps Deps) Deps {
|
|||||||
deps.StaticLibs = append(deps.StaticLibs, "libgtest_main_ndk_c++", "libgtest_ndk_c++")
|
deps.StaticLibs = append(deps.StaticLibs, "libgtest_main_ndk_c++", "libgtest_ndk_c++")
|
||||||
} else if BoolDefault(test.Properties.Isolated, false) {
|
} else if BoolDefault(test.Properties.Isolated, false) {
|
||||||
deps.StaticLibs = append(deps.StaticLibs, "libgtest_isolated_main")
|
deps.StaticLibs = append(deps.StaticLibs, "libgtest_isolated_main")
|
||||||
|
// The isolated library requires liblog, but adding it
|
||||||
|
// as a static library means unit tests cannot override
|
||||||
|
// liblog functions. Instead make it a shared library
|
||||||
|
// dependency.
|
||||||
|
deps.SharedLibs = append(deps.SharedLibs, "liblog")
|
||||||
} else {
|
} else {
|
||||||
deps.StaticLibs = append(deps.StaticLibs, "libgtest_main", "libgtest")
|
deps.StaticLibs = append(deps.StaticLibs, "libgtest_main", "libgtest")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user