[PATCH] D11478: test-release.sh: Defer test errors until the end
Hans Wennborg
hans at chromium.org
Fri Jul 24 09:16:34 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL243116: test-release.sh: Defer test errors until the end (authored by hans).
Changed prior to commit:
http://reviews.llvm.org/D11478?vs=30530&id=30579#toc
Repository:
rL LLVM
http://reviews.llvm.org/D11478
Files:
llvm/trunk/utils/release/test-release.sh
Index: llvm/trunk/utils/release/test-release.sh
===================================================================
--- llvm/trunk/utils/release/test-release.sh
+++ llvm/trunk/utils/release/test-release.sh
@@ -208,6 +208,16 @@
fi
Package=$Package-$Triple
+# Errors to be highlighted at the end are written to this file.
+echo -n > $LogDir/deferred_errors.log
+
+function deferred_error() {
+ Phase="$1"
+ Flavor="$2"
+ Msg="$3"
+ echo "[${Flavor} Phase${Phase}] ${Msg}" | tee -a $LogDir/deferred_errors.log
+}
+
# Make sure that a required program is available
function check_program_exists() {
local program="$1"
@@ -367,13 +377,17 @@
ObjDir="$3"
cd $ObjDir
- ${MAKE} -j $NumJobs -k check-all \
- 2>&1 | tee $LogDir/llvm.check-Phase$Phase-$Flavor.log
+ if ! ( ${MAKE} -j $NumJobs -k check-all \
+ 2>&1 | tee $LogDir/llvm.check-Phase$Phase-$Flavor.log ) ; then
+ deferred_error $Phase $Flavor "check-all failed"
+ fi
if [ "$use_autoconf" = "yes" ]; then
# In the cmake build, unit tests are run as part of check-all.
- ${MAKE} -k unittests \
- 2>&1 | tee $LogDir/llvm.unittests-Phase$Phase-$Flavor.log
+ if ! ( ${MAKE} -k unittests 2>&1 | \
+ tee $LogDir/llvm.unittests-Phase$Phase-$Flavor.log ) ; then
+ deferred_error $Phase $Flavor "unittests failed"
+ fi
fi
cd $BuildDir
@@ -538,4 +552,13 @@
echo "### Package: $Package.tar.xz"
fi
echo "### Logs: $LogDir"
+
+echo "### Errors:"
+if [ -s "$LogDir/deferred_errors.log" ]; then
+ cat "$LogDir/deferred_errors.log"
+ exit 1
+else
+ echo "None."
+fi
+
exit 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11478.30579.patch
Type: text/x-patch
Size: 1650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150724/b39c261e/attachment.bin>
More information about the llvm-commits
mailing list