Print this page
4522 the build doesn't fail nearly often enough
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Jens Elkner <jel+illumos@cs.uni-magdeburg.de>

*** 197,208 **** echo "\n==== Build errors ($LABEL) ====\n" >> $mail_msg_file egrep ":" $SRC/${INSTALLOG}.out | egrep -e "(^${MAKE}:|[ ]error[: \n])" | \ egrep -v "Ignoring unknown host" | \ egrep -v "cc .* -o error " | \ ! egrep -v "warning" >> $mail_msg_file ! if [ "$?" = "0" ]; then build_ok=n this_build_ok=n fi grep "bootblock image is .* bytes too big" $SRC/${INSTALLOG}.out \ >> $mail_msg_file --- 197,209 ---- echo "\n==== Build errors ($LABEL) ====\n" >> $mail_msg_file egrep ":" $SRC/${INSTALLOG}.out | egrep -e "(^${MAKE}:|[ ]error[: \n])" | \ egrep -v "Ignoring unknown host" | \ egrep -v "cc .* -o error " | \ ! egrep -v "warning" | tee $TMPDIR/build_errs${SUFFIX} \ ! >> $mail_msg_file ! if [[ -s $TMPDIR/build_errs${SUFFIX} ]]; then build_ok=n this_build_ok=n fi grep "bootblock image is .* bytes too big" $SRC/${INSTALLOG}.out \ >> $mail_msg_file
*** 216,226 **** | egrep -v '^tic:' \ | egrep -v "symbol (\`|')timezone' has differing types:" \ | egrep -v "parameter <PSTAMP> set to" \ | egrep -v "Ignoring unknown host" \ | egrep -v "redefining segment flags attribute for" \ ! >> $mail_msg_file echo "\n==== Ended OS-Net source build at `date` ($LABEL) ====\n" \ >> $LOGFILE echo "\n==== Elapsed build time ($LABEL) ====\n" >>$mail_msg_file --- 217,231 ---- | egrep -v '^tic:' \ | egrep -v "symbol (\`|')timezone' has differing types:" \ | egrep -v "parameter <PSTAMP> set to" \ | egrep -v "Ignoring unknown host" \ | egrep -v "redefining segment flags attribute for" \ ! | tee $TMPDIR/build_warnings${SUFFIX} >> $mail_msg_file ! if [[ -s $TMPDIR/build_warnings${SUFFIX} ]]; then ! build_ok=n ! this_build_ok=n ! fi echo "\n==== Ended OS-Net source build at `date` ($LABEL) ====\n" \ >> $LOGFILE echo "\n==== Elapsed build time ($LABEL) ====\n" >>$mail_msg_file
*** 331,342 **** >> $mail_msg_file egrep "${MAKE}|ERROR|WARNING" $SRC/pkg/${INSTALLOG}.out | \ grep ':' | \ grep -v PSTAMP | \ ! egrep -v "Ignoring unknown host" \ ! >> $mail_msg_file else # # Handle it gracefully if -p was set but there so # no pkg directory. # --- 336,351 ---- >> $mail_msg_file egrep "${MAKE}|ERROR|WARNING" $SRC/pkg/${INSTALLOG}.out | \ grep ':' | \ grep -v PSTAMP | \ ! egrep -v "Ignoring unknown host" | \ ! tee $TMPDIR/package >> $mail_msg_file ! if [[ -s $TMPDIR/package ]]; then ! build_extras_ok=n ! this_build_ok=n ! fi else # # Handle it gracefully if -p was set but there so # no pkg directory. #
*** 393,406 **** `find . \( -name SCCS -o -name .hg -o -name .svn -o -name .git \) \ -prune -o -type f -name '*.ln' -print ` /bin/time $MAKE -ek lint 2>&1 | \ tee -a $LINTOUT >> $LOGFILE echo "\n==== '$MAKE lint' of $base ERRORS ====\n" >> $mail_msg_file grep "$MAKE:" $LINTOUT | ! egrep -v "Ignoring unknown host" \ ! >> $mail_msg_file echo "\n==== Ended '$MAKE lint' of $base at `date` ====\n" >> $LOGFILE echo "\n==== Elapsed time of '$MAKE lint' of $base ====\n" \ >>$mail_msg_file --- 402,420 ---- `find . \( -name SCCS -o -name .hg -o -name .svn -o -name .git \) \ -prune -o -type f -name '*.ln' -print ` /bin/time $MAKE -ek lint 2>&1 | \ tee -a $LINTOUT >> $LOGFILE + echo "\n==== '$MAKE lint' of $base ERRORS ====\n" >> $mail_msg_file + grep "$MAKE:" $LINTOUT | ! egrep -v "Ignoring unknown host" | \ ! tee $TMPDIR/lint_errs >> $mail_msg_file ! if [[ -s $TMPDIR/lint_errs ]]; then ! build_extras_ok=n ! fi echo "\n==== Ended '$MAKE lint' of $base at `date` ====\n" >> $LOGFILE echo "\n==== Elapsed time of '$MAKE lint' of $base ====\n" \ >>$mail_msg_file
*** 418,434 **** egrep -v '\.c:$' | \ sort | uniq > ${LINTNOISE}.out if [ ! -f ${LINTNOISE}.ref ]; then cp ${LINTNOISE}.out ${LINTNOISE}.ref fi if [ "$dodiff" != "n" ]; then echo "\n==== lint warnings $base ====\n" \ >>$mail_msg_file # should be none, though there are a few that were filtered out # above egrep -i '(warning|lint):' ${LINTNOISE}.out \ ! | sort | uniq >> $mail_msg_file echo "\n==== lint noise differences $base ====\n" \ >> $mail_msg_file diff ${LINTNOISE}.ref ${LINTNOISE}.out \ >> $mail_msg_file fi --- 432,452 ---- egrep -v '\.c:$' | \ sort | uniq > ${LINTNOISE}.out if [ ! -f ${LINTNOISE}.ref ]; then cp ${LINTNOISE}.out ${LINTNOISE}.ref fi + if [ "$dodiff" != "n" ]; then echo "\n==== lint warnings $base ====\n" \ >>$mail_msg_file # should be none, though there are a few that were filtered out # above egrep -i '(warning|lint):' ${LINTNOISE}.out \ ! | sort | uniq | tee $TMPDIR/lint_warns >> $mail_msg_file ! if [[ -s $TMPDIR/lint_warns ]]; then ! build_extras_ok=n ! fi echo "\n==== lint noise differences $base ====\n" \ >> $mail_msg_file diff ${LINTNOISE}.ref ${LINTNOISE}.out \ >> $mail_msg_file fi
*** 457,468 **** echo "\n==== Tools build errors ====\n" >> $mail_msg_file egrep ":" ${TOOLS}/${INSTALLOG}.out | egrep -e "(${MAKE}:|[ ]error[: \n])" | \ egrep -v "Ignoring unknown host" | \ ! egrep -v warning >> $mail_msg_file ! return $? } # # Set up to use locally installed tools. # --- 475,490 ---- echo "\n==== Tools build errors ====\n" >> $mail_msg_file egrep ":" ${TOOLS}/${INSTALLOG}.out | egrep -e "(${MAKE}:|[ ]error[: \n])" | \ egrep -v "Ignoring unknown host" | \ ! egrep -v warning | tee $TMPDIR/tools_errors >> $mail_msg_file ! ! if [[ -s $TMPDIR/tools_errors ]]; then ! return 1 ! fi ! return 0 } # # Set up to use locally installed tools. #
*** 668,677 **** --- 690,700 ---- u_FLAG=n V_FLAG=n w_FLAG=n # build_ok=y + build_extras_ok=y # # examine arguments #
*** 1148,1157 **** --- 1171,1185 ---- ;; *) state=Failed ;; esac + + if [[ $state != "Interrupted" && $build_extras_ok != "y" ]]; then + state=Failed + fi + NIGHTLY_STATUS=$state export NIGHTLY_STATUS run_hook POST_NIGHTLY $state run_hook SYS_POST_NIGHTLY $state
*** 1493,1504 **** -o -name '.make.*' -print | xargs rm -f $MAKE -ek clobber 2>&1 | tee -a $SRC/clobber-${MACH}.out >> $LOGFILE echo "\n==== Make clobber ERRORS ====\n" >> $mail_msg_file grep "$MAKE:" $SRC/clobber-${MACH}.out | ! egrep -v "Ignoring unknown host" \ ! >> $mail_msg_file if [[ "$t_FLAG" = "y" ]]; then echo "\n==== Make tools clobber at `date` ====\n" >> $LOGFILE cd ${TOOLS} rm -f ${TOOLS}/clobber-${MACH}.out --- 1521,1536 ---- -o -name '.make.*' -print | xargs rm -f $MAKE -ek clobber 2>&1 | tee -a $SRC/clobber-${MACH}.out >> $LOGFILE echo "\n==== Make clobber ERRORS ====\n" >> $mail_msg_file grep "$MAKE:" $SRC/clobber-${MACH}.out | ! egrep -v "Ignoring unknown host" | \ ! tee $TMPDIR/clobber_errs >> $mail_msg_file ! ! if [[ -s $TMPDIR/clobber_errs ]]; then ! build_extras_ok=n ! fi if [[ "$t_FLAG" = "y" ]]; then echo "\n==== Make tools clobber at `date` ====\n" >> $LOGFILE cd ${TOOLS} rm -f ${TOOLS}/clobber-${MACH}.out
*** 1506,1515 **** --- 1538,1550 ---- tee -a ${TOOLS}/clobber-${MACH}.out >> $LOGFILE echo "\n==== Make tools clobber ERRORS ====\n" \ >> $mail_msg_file grep "$MAKE:" ${TOOLS}/clobber-${MACH}.out \ >> $mail_msg_file + if (( $? == 0 )); then + build_extras_ok=n + fi rm -rf ${TOOLS_PROTO} mkdir -p ${TOOLS_PROTO} fi typeset roots=$(allprotos)
*** 1776,1786 **** # if [[ "$t_FLAG" = "y" ]]; then set_non_debug_build_flags build_tools ${TOOLS_PROTO} ! if [[ $? != 0 && "$t_FLAG" = y ]]; then use_tools $TOOLS_PROTO fi fi # timestamp the start of the normal build; the findunref tool uses it. --- 1811,1823 ---- # if [[ "$t_FLAG" = "y" ]]; then set_non_debug_build_flags build_tools ${TOOLS_PROTO} ! if (( $? != 0 )); then ! build_ok=n ! else use_tools $TOOLS_PROTO fi fi # timestamp the start of the normal build; the findunref tool uses it.
*** 1834,1846 **** fi if [ "$N_FLAG" != "y" -a -d $SRC/pkg ]; then echo "\n==== Validating manifests against proto area ====\n" \ >> $mail_msg_file ! ( cd $SRC/pkg ; $MAKE -e protocmp ROOT="$checkroot" ) \ ! >> $mail_msg_file ! fi if [ "$N_FLAG" != "y" -a -f "$REF_PROTO_LIST" ]; then echo "\n==== Impact on proto area ====\n" >> $mail_msg_file if [ -n "$E2" ]; then --- 1871,1885 ---- fi if [ "$N_FLAG" != "y" -a -d $SRC/pkg ]; then echo "\n==== Validating manifests against proto area ====\n" \ >> $mail_msg_file ! ( cd $SRC/pkg ; $MAKE -e protocmp ROOT="$checkroot" ) | \ ! tee $TMPDIR/protocmp_noise >> $mail_msg_file ! if [[ -s $TMPDIR/protocmp_noise ]]; then ! build_extras_ok=n ! fi fi if [ "$N_FLAG" != "y" -a -f "$REF_PROTO_LIST" ]; then echo "\n==== Impact on proto area ====\n" >> $mail_msg_file if [ -n "$E2" ]; then
*** 1857,1867 **** $ATLOG/proto_list_${MACH} \ >> $mail_msg_file fi fi ! if [ "$u_FLAG" = "y" -a "$build_ok" = "y" ]; then staffer cp $ATLOG/proto_list_${MACH} \ $PARENT_WS/usr/src/proto_list_${MACH} fi # Update parent proto area if necessary. This is done now --- 1896,1907 ---- $ATLOG/proto_list_${MACH} \ >> $mail_msg_file fi fi ! if [[ "$u_FLAG" == "y" && "$build_ok" == "y" && \ ! "$build_extras_ok" == "y" ]]; then staffer cp $ATLOG/proto_list_${MACH} \ $PARENT_WS/usr/src/proto_list_${MACH} fi # Update parent proto area if necessary. This is done now
*** 1902,1912 **** fi # # ELF verification: ABI (-A) and runtime (-r) checks # ! if [[ ($build_ok = y) && ( ($A_FLAG = y) || ($r_FLAG = y) ) ]]; then # Directory ELF-data.$MACH holds the files produced by these tests. elf_ddir=$SRC/ELF-data.$MACH # If there is a previous ELF-data backup directory, remove it. Then, # rotate current ELF-data directory into its place and create a new --- 1942,1952 ---- fi # # ELF verification: ABI (-A) and runtime (-r) checks # ! if [[ ($build_ok = y) && (($A_FLAG = y) || ($r_FLAG = y)) ]]; then # Directory ELF-data.$MACH holds the files produced by these tests. elf_ddir=$SRC/ELF-data.$MACH # If there is a previous ELF-data backup directory, remove it. Then, # rotate current ELF-data directory into its place and create a new
*** 1930,1939 **** --- 1970,1980 ---- interface_check -o -w $elf_ddir -f object_list \ -i interface -E interface.err if [[ -s $elf_ddir/interface.err ]]; then tee -a $LOGFILE < $elf_ddir/interface.err \ >> $mail_msg_file + build_extras_ok=n fi # If ELF_DATA_BASELINE_DIR is defined, compare the new interface # description file to that from the baseline gate. Issue a # warning if the baseline is not present, and keep going.
*** 1951,1960 **** --- 1992,2002 ---- if [[ -s $elf_ddir/interface.cmp ]]; then echo | tee -a $LOGFILE >> $mail_msg_file tee -a $LOGFILE < \ $elf_ddir/interface.cmp \ >> $mail_msg_file + build_extras_ok=n fi else echo "baseline not available. comparison" \ "skipped" | \ tee -a $LOGFILE >> $mail_msg_file
*** 1975,1994 **** --- 2017,2040 ---- rtime_sflag="-s" fi check_rtime -i -m -v $rtime_sflag -o -w $elf_ddir \ -D object_list -f object_list -E runtime.err \ -I runtime.attr.raw + if (( $? != 0 )); then + build_extras_ok=n + fi # check_rtime -I output needs to be sorted in order to # compare it to that from previous builds. sort $elf_ddir/runtime.attr.raw > $elf_ddir/runtime.attr rm $elf_ddir/runtime.attr.raw # Report errors if [[ -s $elf_ddir/runtime.err ]]; then tee -a $LOGFILE < $elf_ddir/runtime.err \ >> $mail_msg_file + build_extras_ok=n fi # If there is an ELF-data directory from a previous build, # then diff the attr files. These files contain information # about dependencies, versioning, and runpaths. There is some
*** 2058,2068 **** >> $LOGFILE echo "\n==== cstyle/hdrchk errors ====\n" >> $mail_msg_file grep ":" $SRC/check-${MACH}.out | egrep -v "Ignoring unknown host" | \ ! sort | uniq >> $mail_msg_file else echo "\n==== No '$MAKE check' ====\n" >> $LOGFILE fi echo "\n==== Find core files ====\n" | \ --- 2104,2118 ---- >> $LOGFILE echo "\n==== cstyle/hdrchk errors ====\n" >> $mail_msg_file grep ":" $SRC/check-${MACH}.out | egrep -v "Ignoring unknown host" | \ ! sort | uniq | tee $TMPDIR/check_errors >> $mail_msg_file ! ! if [[ -s $TMPDIR/check_errors ]]; then ! build_extras_ok=n ! fi else echo "\n==== No '$MAKE check' ====\n" >> $LOGFILE fi echo "\n==== Find core files ====\n" | \
*** 2097,2107 **** if [ "$CHECK_PATHS" = y -a "$N_FLAG" != y ]; then echo "\n==== Check lists of files ====\n" | tee -a $LOGFILE \ >>$mail_msg_file arg=-b [ "$build_ok" = y ] && arg= ! checkpaths $arg $checkroot 2>&1 | tee -a $LOGFILE >>$mail_msg_file fi if [ "$M_FLAG" != "y" -a "$build_ok" = y ]; then echo "\n==== Impact on file permissions ====\n" \ >> $mail_msg_file --- 2147,2161 ---- if [ "$CHECK_PATHS" = y -a "$N_FLAG" != y ]; then echo "\n==== Check lists of files ====\n" | tee -a $LOGFILE \ >>$mail_msg_file arg=-b [ "$build_ok" = y ] && arg= ! checkpaths $arg $checkroot > $SRC/checkpaths.out 2>&1 ! if [[ -s $SRC/checkpaths.out ]]; then ! tee -a $LOGFILE < $SRC/checkpaths.out >> $mail_msg_file ! build_extras_ok=n ! fi fi if [ "$M_FLAG" != "y" -a "$build_ok" = y ]; then echo "\n==== Impact on file permissions ====\n" \ >> $mail_msg_file
*** 2180,2188 **** # # All done save for the sweeping up. # (whichever exit we hit here will trigger the "cleanup" trap which # optionally sends mail on completion). # ! if [ "$build_ok" = "y" ]; then exit 0 fi exit 1 --- 2234,2242 ---- # # All done save for the sweeping up. # (whichever exit we hit here will trigger the "cleanup" trap which # optionally sends mail on completion). # ! if [[ "$build_ok" == "y" && "$build_extras_ok" == "y" ]]; then exit 0 fi exit 1