diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 8a61ab633803e0cfee53a5c6e3e84adc61650e37..9f8e36b67ce7eb9a73ad59ef4814642b2084ff33 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -678,6 +678,7 @@ EOF echo "=========================================" fi bash $PADDLE_ROOT/tools/check_added_ut.sh + check_approvals_of_unittest 2 get_precision_ut_mac if [[ "$on_precision" == "0" ]];then ctest -E "($disable_ut_quickly)" -LE ${nightly_label} --output-on-failure -j $2 | tee $tmpfile @@ -1152,36 +1153,12 @@ function check_diff_file_for_coverage() { export PADDLE_GIT_DIFF_PY_FILE=${diff_py_file%*,} } -function check_change_of_unittest() { - generate_unittest_spec "PR" - check_approvals_of_unittest 2 -} + function check_sequence_op_unittest(){ /bin/bash ${PADDLE_ROOT}/tools/check_sequence_op.sh } -function generate_unittest_spec() { - spec_kind=$1 - if [ "$spec_kind" == "DEV" ]; then - cat < ${spec_path} -} function assert_api_spec_approvals() { @@ -2510,6 +2487,8 @@ set -x export TEST_NUM_PERCENT_CASES=0.15 precison_cases="" bash $PADDLE_ROOT/tools/check_added_ut.sh + #check change of pr_unnitests and dev_unnitests + check_approvals_of_unittest 2 if [ ${PRECISION_TEST:-OFF} == "ON" ]; then python3.7 $PADDLE_ROOT/tools/get_pr_ut.py fi @@ -3552,7 +3531,6 @@ function main() { enable_unused_var_check parallel_test check_coverage - check_change_of_unittest ${PYTHON_ABI:-""} ;; cpu_cicheck_coverage) check_diff_file_for_coverage @@ -3563,7 +3541,6 @@ function main() { gpu_cicheck_coverage) parallel_test check_coverage - check_change_of_unittest ${PYTHON_ABI:-""} ;; check_coverage_build) check_coverage_build @@ -3626,7 +3603,6 @@ function main() { maccheck_py35) cmake_gen_and_build_mac ${PYTHON_ABI:-""} run_mac_test ${PYTHON_ABI:-""} ${PROC_RUN:-1} - check_change_of_unittest ${PYTHON_ABI:-""} ;; macbuild) cmake_gen ${PYTHON_ABI:-""} diff --git a/tools/check_added_ut.sh b/tools/check_added_ut.sh index 76f5e294d13c1f41c89eed33387f8bbc626640b1..ee6793605af55a196dd3a6dee1ade85d6ec0f8f8 100644 --- a/tools/check_added_ut.sh +++ b/tools/check_added_ut.sh @@ -54,9 +54,11 @@ fi # remove line ended with .exe to get correct deleted_ut list ctest -N | awk -F ':' '{print $2}' | sed '/^$/d' | sed '$d' | sed 's/ //g' | sed '/\.exe$/d' | grep 'test' > $PADDLE_ROOT/br-ut #UNITTEST_DEV.spec is used for checking changes of unnitests between pr and paddle_develop in the later step -spec_path=${PADDLE_ROOT}/paddle/fluid/UNITTEST_DEV.spec -ctest -N | awk -F ':' '{print $2}' | sed '/^$/d' | sed '$d' > ${spec_path} +spec_path_dev=${PADDLE_ROOT}/paddle/fluid/UNITTEST_DEV.spec +ctest -N | awk -F ':' '{print $2}' | sed '/^$/d' | sed '$d' > ${spec_path_dev} cd $PADDLE_ROOT/build +spec_path_pr=${PADDLE_ROOT}/paddle/fluid/UNITTEST_PR.spec +ctest -N | awk -F ':' '{print $2}' | sed '/^$/d' | sed '$d' > ${spec_path_pr} ctest -N | awk -F ':' '{print $2}' | sed '/^$/d' | sed '$d' | sed 's/ //g' | sed '/\.exe$/d' | grep 'test' > $PADDLE_ROOT/pr-ut cd $PADDLE_ROOT grep -F -x -v -f br-ut pr-ut > $PADDLE_ROOT/added_ut