diff options
Diffstat (limited to 'jenkins.sh')
-rwxr-xr-x | jenkins.sh | 50 |
1 files changed, 19 insertions, 31 deletions
@@ -32,6 +32,13 @@ EOF exit $ret } +read_var() +{ + local artifact_list=$1 + local var=$2 + grep "^${var}=" "${artifact_list}" | cut -d = -f 2- +} + if test $# -lt 1; then echo "ERROR: No options for build!" usage @@ -346,7 +353,7 @@ fi # Now we build the cross compiler, for a native compiler this becomes # the stage2 bootstrap build. ret=0 -$CONFIG_SHELL ${abe_dir}/abe.sh --disable update ${tars} ${releasestr} ${platform} ${change} ${try_bootstrap} --timeout 100 --build all --disable make_docs > build.out 2> >(tee build.err >&2) || ret=$? +$CONFIG_SHELL ${abe_dir}/abe.sh --list-artifacts build-artifacts.txt --disable update ${tars} ${releasestr} ${platform} ${change} ${try_bootstrap} --timeout 100 --build all --disable make_docs > build.out 2> >(tee build.err >&2) || ret=$? # If abe returned an error, make jenkins see this as a build failure if test $ret -gt 0; then @@ -384,21 +391,8 @@ if $runtests; then 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} + $CONFIG_SHELL ${abe_dir}/abe.sh --list-artifacts check-artifacts.txt --disable update ${check} ${tars} ${releasestr} ${platform} ${change} ${try_bootstrap} --timeout 100 --build all --disable make_docs > check.out 2> >(tee check.err >&2) || ret=$? # If abe returned an error, make jenkins see this as a build failure if test $ret -gt 0; then @@ -424,14 +418,6 @@ else date=${release} fi -# Setup the remote directory for tcwgweb -xgcc="$(find ${user_workspace} -name xgcc)" - -# If we can't find GCC, our build failed, so don't continue -if test x"${xgcc}" = x; then - exit 1 -fi - # This is the remote directory for tcwgweb where all test results and log # files get copied too. @@ -445,7 +431,7 @@ fi echo "Build by ${requestor} on ${NODE_NAME} with parameters: $orig_parameters" -manifest="$(find ${user_workspace}/_build/builds/ -name destdir -prune -o -name \*manifest.txt -print)" +manifest="$(read_var build-artifacts.txt manifest)" if test x"${manifest}" != x; then echo "node=${node}" >> ${manifest} echo "requestor=${requestor}" >> ${manifest} @@ -492,13 +478,13 @@ sums="$(find ${user_workspace} -name \*.sum -not -path "*/gdb/testsuite/outputs/ # Canadian Crosses are a win32 hosted cross toolchain built on a Linux # machine. if test x"${canadian}" = x"true"; then - $CONFIG_SHELL ${abe_dir}/abe.sh --disable update ${change} ${platform} --build all + $CONFIG_SHELL ${abe_dir}/abe.sh --list-artifacts canadian-build1.txt --disable update ${change} ${platform} --build all distro="$(lsb_release -sc)" # Ubuntu Lucid uses an older version of Mingw32 if test x"${distro}" = x"lucid"; then - $CONFIG_SHELL ${abe_dir}/abe.sh --disable update ${change} ${tars} --host=i586-mingw32msvc ${platform} --build all + $CONFIG_SHELL ${abe_dir}/abe.sh --list-artifacts canadian-build2.txt --disable update ${change} ${tars} --host=i586-mingw32msvc ${platform} --build all else - $CONFIG_SHELL ${abe_dir}/abe.sh --disable update ${change} ${tars} --host=i686-w64-mingw32 ${platform} --build all + $CONFIG_SHELL ${abe_dir}/abe.sh --list-artifacts canadian-build2.txt --disable update ${change} ${tars} --host=i686-w64-mingw32 ${platform} --build all fi fi @@ -515,13 +501,15 @@ if test x"${logserver}" != x"" && test x"${sums}" != x -o x"${runtests}" != x"tr cp ${sums} ${test_logs} ${logs_dir}/ || status=1 # Copy over the logs from make check, which we need to find testcase errors. - checks="$(find ${user_workspace} -name check\*.log)" - cp ${checks} ${logs_dir}/ || status=1 + for check in $(read_var check-artifacts.txt 'log_check_[^=]*'); do + cp ${check} ${logs_dir}/ || status=1 + done fi # Copy over the build logs - logs="$(find ${user_workspace} -name make\*.log)" - cp ${logs} ${logs_dir}/ || status=1 + for makelog in $(read_var check-artifacts.txt 'log_make_[^=]*'); do + cp ${makelog} ${logs_dir}/ || status=1 + done # Copy stdout and stderr output from abe. cp build.out build.err ${logs_dir}/ || status=1 |