Skip to content

Commit

Permalink
TMP: Verify that test is executed
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Jun 11, 2023
1 parent ba6d474 commit 166de10
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/test/shell/bazel/bazel_coverage_cc_test_llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,22 +157,25 @@ end_of_record"
function test_cc_test_llvm_coverage_produces_lcov_report_with_split_postprocessing() {
local -r clang="/usr/bin/clang"
if [[ ! -x ${clang} ]]; then
return
echo "clang not installed. Skipping test."
return 1
fi
local -r clang_version=$(clang --version | grep -o "clang version [0-9]*" | cut -d " " -f 3)
if [ "$clang_version" -lt 9 ] || [ "$clang_version" -eq 10 ] || [ "$clang_version" -eq 11 ]; then
# No lcov produced with <9.0, no branch coverage with 10.0 and 11.0.
echo "clang versions <9.0 as well as 10.0 and 11.0 are not supported." && return
echo "clang versions <9.0 as well as 10.0 and 11.0 are not supported." && return 1
fi

local -r llvm_profdata="/usr/bin/llvm-profdata"
if [[ ! -x ${llvm_profdata} ]]; then
return
echo "llvm-profdata not installed. Skipping test."
return 1
fi

local -r llvm_cov="/usr/bin/llvm-cov"
if [[ ! -x ${llvm_cov} ]]; then
return
echo "llvm-cov not installed. Skipping test."
return 1
fi

setup_a_cc_lib_and_t_cc_test
Expand Down

0 comments on commit 166de10

Please sign in to comment.