[fix][UT]fix coverage compute fail if run string cmd directly (#23878)

This commit is contained in:
chunping authored and GitHub committed 2023-09-05 10:57:54 +08:00
1 parent 32dd088d30
commit a91f9fbccb
1 file changed
+6 -2
+6 -2
View File
@@ -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