summaryrefslogtreecommitdiff
path: root/jenkins.sh
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2018-05-16 22:00:25 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2018-05-16 22:05:48 +0000
commit8b55785212ea1875e24af7a7766fefcbf97f0aa0 (patch)
tree79416147e101d0de6f0d6346330a5ab6b0f97437 /jenkins.sh
parent91ee8bd3b03628b78f8f1ec10af7aa834ff5476d (diff)
jenkins.sh: Fix handling of the case where the build failed.
In such a case, check-artifacts.txt does not exist, and the grep command fails, leaving the script waiting for input on stdin. Change-Id: I078eb8d819719240c92969690631fb73e6ec867e
Diffstat (limited to 'jenkins.sh')
-rwxr-xr-xjenkins.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/jenkins.sh b/jenkins.sh
index 979b2446..da9a7c46 100755
--- a/jenkins.sh
+++ b/jenkins.sh
@@ -74,7 +74,13 @@ upload_to_logserver()
# Find all the test result files.
if test x"${runtests}" = x"true"; then
- sums="$(read_var ${user_workspace}/check-artifacts.txt 'dj_sum_[^=]*')"
+ # Check is check-artifacts.txt is not empty otherwise the
+ # process gets stuck waiting for stdin
+ if test -s ${user_workspace}/check-artifacts.txt ; then
+ sums="$(read_var ${user_workspace}/check-artifacts.txt 'dj_sum_[^=]*')"
+ else
+ status=1
+ fi
fi
# Copy the test results, if any