Skip to content

Instantly share code, notes, and snippets.

@pankajgangwar
pankajgangwar / native_coverage.sh
Last active March 6, 2024 22:09
How to generate native coverage on Android with soong build system.
#!/usr/bin/env bash
###### Module specific parameters starts ######
MODULE_PATH='hardware/interfaces/automotive/vehicle/2.0/default/'
MODULE_INSTALL_PATH='data/nativetest64/vehicle-tests'
INSTRUMENTED_BINARY_NAME='vehicle-tests'
REMOTE_COVERAGE_OUTPUT_DIR='/data/local/tmp/nativetest64/'
SOONG_INTERMEDIATES="out/soong/.intermediates"
GCNO_DIR="$SOONG_INTERMEDIATES/$MODULE_PATH"