From ee0ad1a79f52b0e17177cf30d1019740a2832009 Mon Sep 17 00:00:00 2001 From: Vladimir Zaytsev Date: Fri, 10 Aug 2018 01:11:29 -0700 Subject: Do not hardcode LCOV path fixes #5644 Closes #5646. PiperOrigin-RevId: 208175002 --- src/test/shell/bazel/bazel_coverage_test.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/test') 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 -- cgit v1.2.3