From f3ffec23cf3d2975019c67ab2e07c263ca09e74f Mon Sep 17 00:00:00 2001 From: Lei Wang Date: Thu, 10 May 2018 19:20:03 -0700 Subject: [PATCH] CI: exit when fail any step. (#10579) --- paddle/fluid/inference/tensorrt/test_engine.cc | 2 +- paddle/scripts/paddle_build.sh | 1 + paddle/scripts/paddle_docker_build.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/inference/tensorrt/test_engine.cc b/paddle/fluid/inference/tensorrt/test_engine.cc index 69dbb9a3f2b..e635f0f87d5 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/paddle_build.sh b/paddle/scripts/paddle_build.sh index c9b49adef70..5bef232cd8f 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -473,6 +473,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 0bf8c798924..ac32bf0292d 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} \ -- GitLab