From bb5e99a47f0d83a1ef63df0593c0c57109a66cb4 Mon Sep 17 00:00:00 2001 From: risemeup1 <62429225+risemeup1@users.noreply.github.com> Date: Mon, 26 Sep 2022 20:38:26 +0800 Subject: [PATCH] Optimizing pr ci coverage (#46427) * it is a test for my idea,test=coverage * it is a test,test=coverage * it is a test,test=coverage * optimizing coverage ci for build develop twice * it is a test to delete a unnitest,test=coverage * optimizing pr ci coverage --- paddle/scripts/paddle_build.sh | 4 ---- tools/check_added_ut.sh | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 271cdd23100..b39a8945eb7 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -1154,10 +1154,6 @@ function check_diff_file_for_coverage() { function check_change_of_unittest() { generate_unittest_spec "PR" - fetch_upstream_develop_if_not_exist - git reset --hard upstream/$BRANCH - cmake_gen $1 - generate_unittest_spec "DEV" check_approvals_of_unittest 2 } diff --git a/tools/check_added_ut.sh b/tools/check_added_ut.sh index d59230b1c1f..76f5e294d13 100644 --- a/tools/check_added_ut.sh +++ b/tools/check_added_ut.sh @@ -53,6 +53,9 @@ elif [[ "$SYSTEM" == "Windows_NT" ]];then 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} cd $PADDLE_ROOT/build 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 -- GitLab