aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
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 /src/test
parentf11a0f70394746b11ea12bffd820d1983321b52d (diff)
Do not hardcode LCOV path
fixes #5644 Closes #5646. PiperOrigin-RevId: 208175002
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/shell/bazel/bazel_coverage_test.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/shell/bazel/bazel_coverage_test.sh b/src/test/shell/bazel/bazel_coverage_test.sh
index d221a749fa..ae2b1483ba 100755
--- a/src/test/shell/bazel/bazel_coverage_test.sh
+++ b/src/test/shell/bazel/bazel_coverage_test.sh
@@ -22,7 +22,8 @@ source "${CURRENT_DIR}/../integration_test_setup.sh" \
|| { echo "integration_test_setup.sh not found!" >&2; exit 1; }
function test_cc_test_coverage() {
- if [[ ! -x /usr/bin/lcov ]]; then
+ local -r LCOV=$(which lcov)
+ if [[ ! -x ${LCOV:-/usr/bin/lcov} ]]; then
echo "lcov not installed. Skipping test."
return
fi
@@ -93,7 +94,8 @@ EOF
}
function test_failed_coverage() {
- if [[ ! -x /usr/bin/lcov ]]; then
+ local -r LCOV=$(which lcov)
+ if [[ ! -x ${LCOV:-/usr/bin/lcov} ]]; then
echo "lcov not installed. Skipping test."
return
fi