aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Vladimir Zaytsev <zaytsev@uber.com>2018-08-10 01:11:29 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-08-10 01:13:28 -0700
commitee0ad1a79f52b0e17177cf30d1019740a2832009 (patch)
tree993185543d5fef77f2a5e583b89a91e9439d8406 /tools
parentf11a0f70394746b11ea12bffd820d1983321b52d (diff)
Do not hardcode LCOV path
fixes #5644 Closes #5646. PiperOrigin-RevId: 208175002
Diffstat (limited to 'tools')
-rwxr-xr-xtools/test/collect_coverage.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/test/collect_coverage.sh b/tools/test/collect_coverage.sh
index 58afc82ae4..36e17bb33f 100755
--- a/tools/test/collect_coverage.sh
+++ b/tools/test/collect_coverage.sh
@@ -140,7 +140,11 @@ elif [[ "$COVERAGE_LEGACY_MODE" ]]; then
# the current directory
# -d "${COVERAGE_DIR}" - Directory to search for .gcda files
# -o "${COVERAGE_OUTPUT_FILE}" - Output file
- /usr/bin/lcov -c --no-external --ignore-errors graph -q \
+ LCOV=$(which lcov)
+ if [[ ! -x $LCOV ]]; then
+ LCOV=/usr/bin/lcov
+ fi
+ $LCOV -c --no-external --ignore-errors graph -q \
--gcov-tool "${GCOV}" -b /proc/self/cwd \
-d "${COVERAGE_DIR}" -o "${COVERAGE_OUTPUT_FILE}"