Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e778dc7 authored by Josh Gao's avatar Josh Gao
Browse files

adb: allow filtering by file in coverage/show.sh.

Test: ./coverage.sh transport.cpp
Change-Id: I5fd3b25d9b3edd7a9131dae902e1868ced0384cc
parent d5d5ba16
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -5,8 +5,18 @@ set -euxo pipefail
OUTPUT_DIR=$(realpath $(dirname "$0"))
. "$OUTPUT_DIR"/include.sh

BASE_PATH=/proc/self/cwd/system/core/adb
PATHS=""
if [[ $# == 0 ]]; then
  PATHS=$BASE_PATH
else
  for arg in "$@"; do
    PATHS="$PATHS $BASE_PATH/$arg"
  done
fi

cd $ANDROID_BUILD_TOP
llvm-cov show --instr-profile="$OUTPUT_DIR"/adbd.profdata \
  $ANDROID_PRODUCT_OUT/apex/com.android.adbd/bin/adbd \
  /proc/self/cwd/system/core/adb \
  $PATHS \
  $ADB_TEST_BINARIES