diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2016-12-11 22:46:11 +0100 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2016-12-12 14:16:14 +0100 |
commit | 625e4c0332c1a4ab2da35d5a296564b00f2909c8 (patch) | |
tree | fa5de9ca60fffc1e954b50bd565a138a2e81fe0a /jenkins.sh | |
parent | 383d0aa5fe49ccb9f05ff8176d0fc61018e614fe (diff) |
Make sure we have only one manifest file to deal with.
When jenkins.sh is called shortly before midnight, the 2 calls to
abe.sh can generate 2 manifest files (different name because of
different date). The code can handle one only.
Change-Id: I30105f39a4c121cec095cd4cbe1000d5b6a96817
Diffstat (limited to 'jenkins.sh')
-rwxr-xr-x | jenkins.sh | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -382,8 +382,22 @@ if test x"${runtests}" = xtrue; then check="$check --testcontainer $(cat "$testcontainer_file")" fi + + # This second call to abe.sh will (re)generate the manifest, + # possibly creating a second one if the two calls to abe.sh take + # place on different days (e.g. when a build is started shortly + # before midnight). Delete the second manifest created, as later + # code cannot cope with 2 manifests. This is safe because both + # have the same contents, except for the dates supplied to the + # --pkgversion configure options. + manifest1="`find ${user_workspace}/_build/builds/ -name destdir -prune -o -name \*manifest.txt -print`" + mv ${manifest1} ${manifest1}.keep + ret=0 $CONFIG_SHELL ${abe_dir}/abe.sh --disable update ${check} ${tars} ${releasestr} ${platform} ${change} ${try_bootstrap} --timeout 100 --build all --disable make_docs > check.out 2> >(tee check.err >&2) || ret=$? + manifest2="`find ${user_workspace}/_build/builds/ -name destdir -prune -o -name \*manifest.txt -print`" + rm ${manifest2} + mv ${manifest1}.keep ${manifest1} # If abe returned an error, make jenkins see this as a build failure if test $ret -gt 0; then |