diff options
author | Rob Savoye <rob.savoye@linaro.org> | 2014-11-05 14:33:44 -0700 |
---|---|---|
committer | Rob Savoye <rob.savoye@linaro.org> | 2014-11-05 14:33:44 -0700 |
commit | 4de0bb04797d93d249c4ca35760a75a640dbd989 (patch) | |
tree | 4cd6ee51a3808c979eb902cba8b00439e57c7e37 | |
parent | 62bee1d67f39147b33c57b3e7537fbe73f68f5c5 (diff) |
add function to notify gerrit when a test run is completed
Change-Id: I404604d04ed7f4d0a7e5f43c337e7b2c95df66a4
-rwxr-xr-x | cbuild2.sh | 17 | ||||
-rw-r--r-- | lib/gerrit.sh | 6 |
2 files changed, 18 insertions, 5 deletions
@@ -447,7 +447,7 @@ set_package() build_failure() { - time="`expr ${SECONDS} / 60`" + local time="`expr ${SECONDS} / 60`" error "Build process failed after ${time} minutes" if test x"${gerrit}" = xyes; then @@ -458,7 +458,7 @@ build_failure() build_success() { - time="`expr ${SECONDS} / 60`" + local time="`expr ${SECONDS} / 60`" notice "Build process succeeded after ${time} minutes" if test x"${gerrit}" = xyes; then @@ -468,6 +468,18 @@ build_success() return 0 } +test_success() +{ + local time="`expr ${SECONDS} / 60`" + notice "Test run completed after ${time} minutes" + + if test x"${gerrit}" = xyes; then + gerrit_build_status ${gcc_version} 6 + fi + + return 0 +} + # Switches that require a following directive need to make sure they don't # parse the -- of the following switch. check_directive() @@ -981,6 +993,7 @@ if test ! -z ${do_build}; then fi fi else + buildingall=yes build_all if test $? -gt 0; then error "Build all failed." diff --git a/lib/gerrit.sh b/lib/gerrit.sh index 2e76647..410aaaa 100644 --- a/lib/gerrit.sh +++ b/lib/gerrit.sh @@ -207,12 +207,12 @@ gerrit_build_status() gerrit_info ${rcdir} fi - declare -a statusmsg=("Build was Successful" "Build Failed!" "No Test Failures" "Found Test Failures" "No Regressions found" "Found regressions") + declare -a statusmsg=("Build was Successful" "Build Failed!" "No Test Failures" "Found Test Failures" "No Regressions found" "Found regressions" "Test run completed") rm -f ${msgfile} cat<<EOF > ${msgfile} -Your patch is being reviewed. The build step has completed with a status of: ${statusmsg[${status}]} - +Your patch is being reviewed. The build step has completed with a status of: ${statusmsg[${status}]} Build at: ${jenkins_job_url}" + EOF #http://cbuild.validation.linaro.org/logs/gcc-linaro-5.0.0/ |