llvm.org GIT mirror llvm / e30be6c
Merging r243116: ------------------------------------------------------------------------ r243116 | hans | 2015-07-24 09:16:09 -0700 (Fri, 24 Jul 2015) | 10 lines test-release.sh: Defer test errors until the end This makes the script run to the end and produce tarballs even on test failures, and then highlights any errors afterwards. (I first tried just storing the errors in a global variable, but that didn't work as the "test_llvmCore" function invocation is actually running as a sub-shell.) Differential Revision: http://reviews.llvm.org/D11478 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243117 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 4 years ago
1 changed file(s) with 27 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
190190 Package=$Package-$RC
191191 fi
192192 Package=$Package-$Triple
193
194 # Errors to be highlighted at the end are written to this file.
195 echo -n > $LogDir/deferred_errors.log
196
197 function deferred_error() {
198 Phase="$1"
199 Flavor="$2"
200 Msg="$3"
201 echo "[${Flavor} Phase${Phase}] ${Msg}" | tee -a $LogDir/deferred_errors.log
202 }
193203
194204 # Make sure that a required program is available
195205 function check_program_exists() {
350360 ObjDir="$3"
351361
352362 cd $ObjDir
353 ${MAKE} -j $NumJobs -k check-all \
354 2>&1 | tee $LogDir/llvm.check-Phase$Phase-$Flavor.log
363 if ! ( ${MAKE} -j $NumJobs -k check-all \
364 2>&1 | tee $LogDir/llvm.check-Phase$Phase-$Flavor.log ) ; then
365 deferred_error $Phase $Flavor "check-all failed"
366 fi
355367
356368 if [ "$use_autoconf" = "yes" ]; then
357369 # In the cmake build, unit tests are run as part of check-all.
358 ${MAKE} -k unittests \
359 2>&1 | tee $LogDir/llvm.unittests-Phase$Phase-$Flavor.log
370 if ! ( ${MAKE} -k unittests 2>&1 | \
371 tee $LogDir/llvm.unittests-Phase$Phase-$Flavor.log ) ; then
372 deferred_error $Phase $Flavor "unittests failed"
373 fi
360374 fi
361375
362376 cd $BuildDir
521535 echo "### Package: $Package.tar.xz"
522536 fi
523537 echo "### Logs: $LogDir"
538
539 echo "### Errors:"
540 if [ -s "$LogDir/deferred_errors.log" ]; then
541 cat "$LogDir/deferred_errors.log"
542 exit 1
543 else
544 echo "None."
545 fi
546
524547 exit 0