File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,13 +119,11 @@ gen_diff_html_report || true
119119
120120export COVERAGE_FILE=/paddle/build/python-coverage.data
121121
122- set +x
123- coverage combine ` ls python-coverage.data.* `
124- set -x
122+ coverage combine ` $( ls python-coverage.data.* ) ` || NO_PYTHON_COVERAGE_DATA=1
125123
126- coverage xml -i -o python-coverage.xml
124+ ` $( coverage xml -i -o python-coverage.xml) ` || [[ " ${NO_PYTHON_COVERAGE_DATA} " == " 1 " ]]
127125
128- python3.7 ${PADDLE_ROOT} /tools/coverage/python_coverage.py > python-coverage.info
126+ ` $( python3.7 ${PADDLE_ROOT} /tools/coverage/python_coverage.py > python-coverage.info) ` || [[ " ${NO_PYTHON_COVERAGE_DATA} " == " 1 " ]]
129127
130128# python full html report
131129#
@@ -186,7 +184,9 @@ echo "Assert Python Diff Coverage"
186184if [ ${WITH_XPU:- OFF} == " ON" ]; then
187185 echo " XPU has no python coverage!"
188186else
189- python3.7 ${PADDLE_ROOT} /tools/coverage/coverage_lines.py python-coverage-diff.info 0.9 || PYTHON_COVERAGE_LINES_ASSERT=1
187+ if [[ " ${NO_PYTHON_COVERAGE_DATA} " != " 1" ]]; then
188+ python3.7 ${PADDLE_ROOT} /tools/coverage/coverage_lines.py python-coverage-diff.info 0.9 || PYTHON_COVERAGE_LINES_ASSERT=1
189+ fi
190190fi
191191
192192if [ " $COVERAGE_LINES_ASSERT " = " 1" ] || [ " $PYTHON_COVERAGE_LINES_ASSERT " = " 1" ]; then
You can’t perform that action at this time.
0 commit comments