diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/acov | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/acov b/scripts/acov index ef7c86a95..c33ede22f 100755 --- a/scripts/acov +++ b/scripts/acov @@ -36,11 +36,22 @@ if [ $? -ne 0 ]; then sudo apt-get install lcov fi +HOST=false +ANDROID_OUT=$ANDROID_PRODUCT_OUT +if [ "$1" = "--host" ]; then + HOST=true + ANDROID_OUT=$ANDROID_HOST_OUT +fi + cd $ANDROID_BUILD_TOP FILE=cov.info DIR=$(mktemp -d covreport-XXXXXX) -adb pull /data/local/tmp/gcov -lcov -c -d $ANDROID_PRODUCT_OUT -o $DIR/$FILE + +if [ "$HOST" = "false" ]; then + adb pull /data/local/tmp/gcov +fi + +lcov -c -d $ANDROID_OUT -o $DIR/$FILE echo "Generating coverage report at $DIR" genhtml -q -o $DIR $DIR/$FILE xdg-open $DIR/index.html >/dev/null |