Extend coverage mutator to allow variants with coverage on and off
Bug: http://b/116873221 This allows us to enable coverage for a module (typically static libraries) even if a dependent module cannot build with coverage. In this case, the dependent module can just pick the variant with coverage off. - Create the following variants from the coverage mutator: - "" (empty): Don't build with coverage and always pick the non-coverage variants for dependents. This variant is created for modules with 'native_coverage: false'. - "cov": If this module's path is covered by the COVERAGE_PATHS option, build this module with coverage. If not, build this module without coverage. In either case, pick coverage variants ("cov") for dependencies if available. - Do not enable coverage: - for NDK stub libraries - if sdk_version < 23 since libc doesn't export 'stderr' which is needed by the coverage/profile runtime library. - for VNDK libraries Test: In AOSP: m COVERAGE_PATHS=system/security NATIVE_COVERAGE=true nothing Change-Id: I4d08790d35cdeaf12fb3c4f999d69a870e65836a
Loading
Please register or sign in to comment