diff --git a/paddle/fluid/inference/tensorrt/test_engine.cc b/paddle/fluid/inference/tensorrt/test_engine.cc index 69dbb9a3f2b92c97813f31e179a35a753bbb62d9..e635f0f87d577a1f1ac74687ee60f762be525418 100644 --- a/paddle/fluid/inference/tensorrt/test_engine.cc +++ b/paddle/fluid/inference/tensorrt/test_engine.cc @@ -98,7 +98,7 @@ TEST_F(TensorRTEngineTest, add_layer_multi_dim) { float x_v[2] = {1.0, 2.0}; engine_->SetInputFromCPU("x", reinterpret_cast(&x_v), - 2 * sizeof(float)); + 2 * sizeof(float)); engine_->Execute(1); LOG(INFO) << "to get output"; diff --git a/paddle/scripts/docker/build.sh b/paddle/scripts/docker/build.sh index 7e00bd38487902227c3b4521db20cdbe314059be..c63b57ce40e737576fc4a7697bc44136218cc31a 100755 --- a/paddle/scripts/docker/build.sh +++ b/paddle/scripts/docker/build.sh @@ -100,7 +100,14 @@ function run_test() { Running unit tests ... ======================================== EOF + set +e ctest --output-on-failure + if [ $? != 0 ]; then + set -e + ctest --output-on-failure --rerun-failed + set +e + fi + set -e # make install should also be test when unittest make install -j `nproc` pip install /usr/local/opt/paddle/share/wheels/*.whl diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 1595cc9e8aad4d143ca62f84f812dbc791dc1d26..245b580bdff53cd4a70aa013762c4634d2819e7d 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -299,7 +299,14 @@ function run_test() { Running unit tests ... ======================================== EOF + set +e ctest --output-on-failure + if [ $? != 0 ]; then + set -e + ctest --output-on-failure --rerun-failed + set +e + fi + set -e # make install should also be test when unittest make install -j `nproc` pip install /usr/local/opt/paddle/share/wheels/*.whl @@ -467,6 +474,7 @@ EOF } function main() { + set -e local CMD=$1 init case $CMD in diff --git a/paddle/scripts/paddle_docker_build.sh b/paddle/scripts/paddle_docker_build.sh index ddae9f19a21b404c9b24b47d433e07db4603dc8b..7f5f7902bb7c68a554cfe0e82bf86a58e1725baa 100755 --- a/paddle/scripts/paddle_docker_build.sh +++ b/paddle/scripts/paddle_docker_build.sh @@ -59,7 +59,7 @@ EOL if [ ! -d "${HOME}/.ccache" ]; then mkdir ${HOME}/.ccache fi - set -x + set -ex ${DOCKER_CMD} run -it \ --name $CONTAINER_ID \ ${DOCKER_ENV} \