diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 404099f5e8b00b21eb29e6851451a48946308d85..48f97c076cd6680fc4ff34d7103e54d8f527bd30 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -685,28 +685,23 @@ EOF echo "ipipe_log_param_Mac_TestCases_Time: $[ $ut_endTime_s - $ut_startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt paddle version # Recovery proxy to avoid failure in later steps - set +x export http_proxy=$my_proxy export https_proxy=$my_proxy if [ "$mactest_error" != 0 ];then show_ut_retry_result fi - set -x fi } function get_precision_ut_mac() { on_precision=0 - set -x UT_list=$(ctest -N | awk -F ': ' '{print $2}' | sed '/^$/d' | sed '$d') precison_cases="" if [ ${PRECISION_TEST:-OFF} == "ON" ]; then python3.7 $PADDLE_ROOT/tools/get_pr_ut.py if [[ -f "ut_list" ]]; then - set +x echo "PREC length: "`wc -l ut_list` precision_cases=`cat ut_list` - set -x fi fi if [ ${PRECISION_TEST:-OFF} == "ON" ] && [[ "$precision_cases" != "" ]];then diff --git a/tools/coverage/gcda_clean.py b/tools/coverage/gcda_clean.py index 39fa3509cb86eb51d16abbcabcf5b12cb99df1bb..12bd04a6907ea9bb83b5c25daf9c74f28982724d 100644 --- a/tools/coverage/gcda_clean.py +++ b/tools/coverage/gcda_clean.py @@ -18,6 +18,7 @@ import os import sys +import time from github import Github @@ -33,7 +34,18 @@ def get_pull(pull_id): """ token = os.getenv('GITHUB_API_TOKEN') github = Github(token, timeout=60) - repo = github.get_repo('PaddlePaddle/Paddle') + idx = 1 + while idx < 4: + try: + repo = github.get_repo('PaddlePaddle/Paddle') + except Exception as e: + print(e) + print("get_repo error, retry {} times after {} secs.".format( + idx, idx * 10)) + else: + break + idx += 1 + time.sleep(idx * 10) pull = repo.get_pull(pull_id) return pull diff --git a/tools/coverage/paddle_coverage.sh b/tools/coverage/paddle_coverage.sh index fd28d939bd1cc74bdfc34ae8f1c8885ba7e393ed..7fb32040e795ca7ab2369900e7ceefb5c4808836 100644 --- a/tools/coverage/paddle_coverage.sh +++ b/tools/coverage/paddle_coverage.sh @@ -33,7 +33,7 @@ make install cd /paddle/build -python3.7 ${PADDLE_ROOT}/tools/coverage/gcda_clean.py ${GIT_PR_ID} +python3.7 ${PADDLE_ROOT}/tools/coverage/gcda_clean.py ${GIT_PR_ID} || exit 101 lcov --capture -d ./ -o coverage.info --rc lcov_branch_coverage=0