Skip to content

Commit

Permalink
[fix][UT]fix coverage compute fail if run string cmd directly (#23878)
Browse files Browse the repository at this point in the history
  • Loading branch information
pingchunzhang authored and xiaokang committed Sep 5, 2023
1 parent c0a0322 commit d2fb1b6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions run-be-ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,15 @@ if [[ -f "${test}" ]]; then
if [[ -d "${DORIS_TEST_BINARY_DIR}"/report ]]; then
rm -rf "${DORIS_TEST_BINARY_DIR}"/report
fi
"${LLVM_PROFDATA} merge -o ${profdata} ${profraw}"
"${LLVM_COV} show -output-dir=${DORIS_TEST_BINARY_DIR}/report -format=html \
cmd1="${LLVM_PROFDATA} merge -o ${profdata} ${profraw}"
echo "${cmd1}"
eval "${cmd1}"
cmd2="${LLVM_COV} show -output-dir=${DORIS_TEST_BINARY_DIR}/report -format=html \
-ignore-filename-regex='(.*gensrc/.*)|(.*_test\.cpp$)|(.*be/test.*)|(.*apache-orc/.*)|(.*clucene/.*)' \
-instr-profile=${profdata} \
-object=${test}"
echo "${cmd2}"
eval "${cmd2}"
else
"${test}" --gtest_output="xml:${GTEST_OUTPUT_DIR}/${file_name}.xml" --gtest_print_time=true "${FILTER}"
fi
Expand Down

0 comments on commit d2fb1b6

Please sign in to comment.