summaryrefslogtreecommitdiff
path: root/MakeRelease.job
diff options
context:
space:
mode:
authorRyan S. Arnold <ryan.arnold@linaro.org>2016-07-01 18:07:46 -0500
committerRyan Arnold <ryan.arnold@linaro.org>2016-07-08 18:08:21 +0000
commit40cec093379f415160e5c20b205916fdbf929341 (patch)
tree6d35f3df52ed3f69c540549ba3e55d7381cc53d1 /MakeRelease.job
parentb631d44e376a9153c6130e9fe2130a880c693dcb (diff)
scripts/MakeRelease.job: Copy logs to fileserver even if toolchain builds fail.
Change-Id: I62c5edaeea682623a98e6fcb63780e29596ca5bc
Diffstat (limited to 'MakeRelease.job')
-rwxr-xr-xMakeRelease.job41
1 files changed, 26 insertions, 15 deletions
diff --git a/MakeRelease.job b/MakeRelease.job
index c6781e7c..12af2c2f 100755
--- a/MakeRelease.job
+++ b/MakeRelease.job
@@ -131,40 +131,51 @@ srcs="${gcc} ${binutils} ${glibc} ${manifest}"
# Build a binary release tarball
# Remove logfile if present (for some unknown reason)
rm -f ${logfile}
+local abe_ret=0
# Canadian cross builds require a Linux hosted cross compiler first
if test x"${canadian}" = x"true"; then
$CONFIG_SHELL ${abe_dir}/abe.sh ${update} --release ${release} ${srcs} ${platform} --build all ${libc} ${extra} >> ${logfile}
+ abe_ret=$?
host="--host i686-w64-mingw32"
rm -fr ${local_builds}/${host}/${target}/
else
host=""
fi
-$CONFIG_SHELL ${abe_dir}/abe.sh ${update} --release ${release} --tarbin ${srcs} ${platform} ${host} --build all ${libc} ${extra} >> ${logfile}
-# force a failure if abe has build problems.
-if test $? -gt 0; then
- exit 1
+# If we're not building the mingw32 compiler 'abe_ret' will be zero and the
+# following conditional will build the linux cross-compiler. Otherwise it'll
+# build the mingw32 compiler only if the previous cross-compiler build was
+# successful.
+if test ${abe_ret} -eq 0; then
+ $CONFIG_SHELL ${abe_dir}/abe.sh ${update} --release ${release} --tarbin ${srcs} ${platform} ${host} --build all ${libc} ${extra} >> ${logfile}
+ abe_ret=$?
+fi
+
+gcc_ver="$(echo $gcc_src | sed -e "s/^gcc-linaro-\([0-9\.]\+\).*\$/gcc-linaro-\1/")"
+if [ x"$gcc_ver" = x"$gcc_src" ]; then
+ gcc_ver="$release"
fi
+# Fileserver location of binary tarballs and build logfiles
+binaries="/work/space/binaries/${gcc_ver}/${target}"
+logs="/work/space/logs/${gcc_ver}/${target}"
+snaps="/home/abe/var/snapshots/"
+
# Copy the build log to the fileserver
if test -e ${logfile}; then
echo "Compressing log file..."
xz ${logfile}
- echo "Copying compressed log file ${logfile}.xz to ${fileserver}:${bases}..."
- scp ${logfile}.xz ${fileserver}:${bases}/
+ ssh ${fileserver} "if test ! -d ${logs}; then mkdir -p ${logs}; fi"
+ echo "Copying compressed log file ${logfile}.xz to ${fileserver}:${logs}..."
+ scp ${logfile}.xz ${fileserver}:${logs}/
fi
-# Copy the source build test results and tarballs to the fileserver
-bases="/work/abe/baselines/${release}/${target}"
-snaps="/home/abe/var/snapshots/"
-
-# Copy the binary test results to the fileserver
-gcc_ver="$(echo $gcc_src | sed -e "s/^gcc-linaro-\([0-9\.]\+\).*\$/gcc-linaro-\1/")"
-if [ x"$gcc_ver" = x"$gcc_src" ]; then
- gcc_ver="$release"
+# force a failure if abe has build problems.
+if test ${abe_ret} -ne 0; then
+ exit 1
fi
-binaries="/work/space/binaries/${gcc_ver}/${target}"
+# Copy the binary test results to the fileserver
manifest="`find ${user_workspace} -name \*manifest.txt`"
ssh ${fileserver} "if test ! -d ${binaries}; then mkdir -p ${binaries}; fi"
scp ${manifest} ${fileserver}:${binaries}/