From ec2cac44f9fb433136938c35046be2668b2f180c Mon Sep 17 00:00:00 2001 From: YUNSHEN XIE <1084314248@qq.com> Date: Mon, 11 Jan 2021 11:32:03 +0800 Subject: [PATCH] use wget to replace curl to download the lcov file (#30229) * use wget to replace curl to download the lcov file * add cache for lcov --- tools/coverage/paddle_coverage.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/coverage/paddle_coverage.sh b/tools/coverage/paddle_coverage.sh index 471887ca21..fd28d939bd 100644 --- a/tools/coverage/paddle_coverage.sh +++ b/tools/coverage/paddle_coverage.sh @@ -19,8 +19,13 @@ set -xe PADDLE_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}")/../../" && pwd )" # install lcov -curl -o /lcov-1.14.tar.gz --connect-timeout 600 --retry 10 --retry-delay 10 -x "" -s https://paddle-ci.gz.bcebos.com/coverage/lcov-1.14.tar.gz || exit 101 -tar -xf /lcov-1.14.tar.gz -C / +if [ ! -f "/root/.cache/lcov-1.14.tar.gz" ];then + wget -P /home https://paddle-ci.gz.bcebos.com/coverage/lcov-1.14.tar.gz --no-proxy --no-check-certificate || exit 101 + cp /home/lcov-1.14.tar.gz /root/.cache/lcov-1.14.tar.gz +else + cp /root/.cache/lcov-1.14.tar.gz /home/lcov-1.14.tar.gz +fi +tar -xf /home/lcov-1.14.tar.gz -C / cd /lcov-1.14 make install -- GitLab