Improve cc tests by adding sanitizer mutators

This fixes an issue that arises when deduping cc build component
registration code.

The sanitize_runtime_deps and sanitize_runtime post deps mutators were
not previously added when running cc tests. That meant the tests were
not actually testing the same behavior as at runtime.

Adding the mutators breaks the TestFuzzTarget test as the mutator adds
libclang_rt.ubsan_standalone-aarch64-android as a dependency of libc++
and the former is not available.

This fixes the test by adding the missing dependency as a cc prebuilt
shared library.

Test: m checkbuild
Bug: 146540677
Change-Id: Ie13c7e6fcefef7d9cb1cc5364be3dc563ce40de5
This commit is contained in:
Paul Duffin
2019-12-19 14:38:36 +00:00
parent 0c4979bbdf
commit d686791c16
6 changed files with 14 additions and 10 deletions

View File

@@ -74,7 +74,6 @@ func testContext() *android.TestContext {
RegisterDocsBuildComponents(ctx)
RegisterStubsBuildComponents(ctx)
RegisterSdkLibraryBuildComponents(ctx)
android.RegisterPrebuiltMutators(ctx)
ctx.PreArchMutators(android.RegisterDefaultsPreArchMutators)
RegisterPrebuiltApisBuildComponents(ctx)