This is an automated email from the ASF dual-hosted git repository.

michaelsmith pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 1823604fed9044325b33bf7ce080103940e8f3eb
Author: Joe McDonnell <[email protected]>
AuthorDate: Wed Jul 31 10:31:37 2024 -0700

    IMPALA-13264: Use the toolchain's gcov for bin/coverage_helper.sh
    
    Currently, bin/coverage_helper.sh will use the system gcov if
    it is available and fall back to the toolchain version
    otherwise. The toolchain's GCC always has gcov available and it
    is useful to have the gcov version match our compiler version.
    So, this switches bin/coverage_helper.sh to always use gcov from
    the toolchain's GCC directory.
    
    Testing:
     - Generated a coverage report locally
    
    Change-Id: Ia9abc42d6fbab510c36889a0038d14866c9cffa9
    Reviewed-on: http://gerrit.cloudera.org:8080/21624
    Reviewed-by: Impala Public Jenkins <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 bin/coverage_helper.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/coverage_helper.sh b/bin/coverage_helper.sh
index 383d96e87..408c28989 100755
--- a/bin/coverage_helper.sh
+++ b/bin/coverage_helper.sh
@@ -66,9 +66,9 @@ fi
 if [ ${REPORT_ACTION} -eq 1 ]; then
   mkdir -p "${REPORT_DIRECTORY}"
   rm -f "${REPORT_DIRECTORY}"/index*.html
-  if ! which gcov > /dev/null; then
-    export 
PATH="$PATH:$IMPALA_TOOLCHAIN_PACKAGES_HOME/gcc-$IMPALA_GCC_VERSION/bin"
-  fi
+  # Use gcov from the toolchain's GCC directory, so the gcov version always 
matches
+  # our toolchain compiler version.
+  export 
PATH="$IMPALA_TOOLCHAIN_PACKAGES_HOME/gcc-$IMPALA_GCC_VERSION/bin:$PATH"
   echo "Using gcov at `which gcov`"
   # src/util/bit-packing.inline.h gets lots of hits, so generating a detailed 
report
   # for it takes several minutes. Exclude it to keep the execution time down.

Reply via email to