From a3d30e6351761070a755e054100fe35557d6390f Mon Sep 17 00:00:00 2001 From: huanghaiquan Date: Fri, 10 Jan 2020 16:02:33 +0800 Subject: [PATCH] Fixed the bug of test script, which would abort the test execution when skipping the update of submodules; --- build/repo.sh | 2 +- build/test.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build/repo.sh b/build/repo.sh index b5cb3a75..56aac1d5 100755 --- a/build/repo.sh +++ b/build/repo.sh @@ -106,7 +106,7 @@ done #检查是否要跳过子模块更新环节; if [ $SKIP_SUBMODULES_UPDATE == 1 ] then - echo "跳过子模块代码更新操作。。。" + echo "跳过子模块代码更新操作。。。[$RTN]" ${RTN} fi diff --git a/build/test.sh b/build/test.sh index d9c08725..5991af7c 100755 --- a/build/test.sh +++ b/build/test.sh @@ -1,4 +1,5 @@ - +#定义子脚本的错误返回命令 +RTN="return" #调用当前脚本目录下 env.sh 脚本,设置环境变量,处理当前传入参数; if [ ! $ENV_SHELL ] @@ -13,7 +14,7 @@ source $UPDATE_SHELL ERR=$? if [ $ERR != 0 ] then - echo "更新代码库时发生了错误[$ERR]!!终止测试!!" + echo "更新代码库时发生了错误[$ERR]!!终止测试!! [$RTN]" ${RTN} $ERR fi @@ -30,7 +31,7 @@ mvn clean package ERR=$? if [ $ERR != 0 ] then - echo "集成测试过程中发生了错误[$ERR]!!终止测试!!" + echo "集成测试过程中发生了错误[$ERR]!!终止测试!! [$RTN]" ${RTN} $ERR fi