From 7a401da52fff206d577a239351b11cbf5246bf43 Mon Sep 17 00:00:00 2001 From: Jiabin Yang Date: Tue, 28 May 2019 20:42:45 +0800 Subject: [PATCH] test=develop, fix mac ci will not uninstall dependency files when error occurs (#17688) --- paddle/scripts/paddle_build.sh | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index bd0f21bdd39..68ddd3dc652 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -390,6 +390,19 @@ EOF ctest --output-on-failure -j $2 # make install should also be test when unittest make install -j 8 + + set +ex + if [ "$1" == "cp27-cp27m" ]; then + pip uninstall -y paddlepaddle + elif [ "$1" == "cp35-cp35m" ]; then + pip3.5 uninstall -y paddlepaddle + elif [ "$1" == "cp36-cp36m" ]; then + pip3.6 uninstall -y paddlepaddle + elif [ "$1" == "cp37-cp37m" ]; then + pip3.7 uninstall -y paddlepaddle + fi + set -ex + if [ "$1" == "cp27-cp27m" ]; then set -e pip install --user ${INSTALL_PREFIX:-/paddle/build}/opt/paddle/share/wheels/*.whl @@ -403,16 +416,6 @@ EOF fi paddle version - - if [ "$1" == "cp27-cp27m" ]; then - pip uninstall -y paddlepaddle - elif [ "$1" == "cp35-cp35m" ]; then - pip3.5 uninstall -y paddlepaddle - elif [ "$1" == "cp36-cp36m" ]; then - pip3.6 uninstall -y paddlepaddle - elif [ "$1" == "cp37-cp37m" ]; then - pip3.7 uninstall -y paddlepaddle - fi fi } -- GitLab