Print this page
9868 unused cw translations should be removed

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/nightly.sh
          +++ new/usr/src/tools/scripts/nightly.sh
↓ open down ↓ 115 lines elided ↑ open up ↑
 116  116          fi
 117  117  
 118  118          # DEBUG build ends
 119  119  
 120  120          p_FLAG="$orig_p_FLAG"
 121  121  }
 122  122  
 123  123  #
 124  124  # usage: run_hook HOOKNAME ARGS...
 125  125  #
 126      -# If variable "$HOOKNAME" is defined, insert a section header into 
      126 +# If variable "$HOOKNAME" is defined, insert a section header into
 127  127  # our logs and then run the command with ARGS
 128  128  #
 129  129  function run_hook {
 130  130          HOOKNAME=$1
 131      -        eval HOOKCMD=\$$HOOKNAME
      131 +        eval HOOKCMD=\$$HOOKNAME
 132  132          shift
 133  133  
 134      -        if [ -n "$HOOKCMD" ]; then 
 135      -                (
      134 +        if [ -n "$HOOKCMD" ]; then
      135 +                (
 136  136                          echo "\n==== Running $HOOKNAME command: $HOOKCMD ====\n"
 137      -                        ( $HOOKCMD "$@" 2>&1 )
      137 +                        ( $HOOKCMD "$@" 2>&1 )
 138  138                          if [ "$?" -ne 0 ]; then
 139      -                                # Let exit status propagate up
 140      -                                touch $TMPDIR/abort
      139 +                                # Let exit status propagate up
      140 +                                touch $TMPDIR/abort
 141  141                          fi
 142  142                  ) | tee -a $mail_msg_file >> $LOGFILE
 143  143  
 144  144                  if [ -f $TMPDIR/abort ]; then
 145  145                          build_ok=n
 146  146                          echo "\nAborting at request of $HOOKNAME" |
 147  147                                  tee -a $mail_msg_file >> $LOGFILE
 148  148                          exit 1
 149  149                  fi
 150  150          fi
↓ open down ↓ 127 lines elided ↑ open up ↑
 278  278                          | egrep -v '^Applet length read:' \
 279  279                          | egrep -v 'bytes written:' \
 280  280                          | egrep -v '^File:SolarisAuthApplet.bin' \
 281  281                          | egrep -v -i 'jibversion' \
 282  282                          | egrep -v '^Output size:' \
 283  283                          | egrep -v '^Solo size statistics:' \
 284  284                          | egrep -v '^Using ROM API Version' \
 285  285                          | egrep -v '^Zero Signature length:' \
 286  286                          | egrep -v '^Note \(probably harmless\):' \
 287  287                          | egrep -v '::' \
 288      -                        | egrep -v -- '-xcache' \
 289  288                          | egrep -v '^\+' \
 290      -                        | egrep -v '^cc1: note: -fwritable-strings' \
 291  289                          | egrep -v 'svccfg-native -s svc:/' \
 292  290                          | sort | uniq >$SRC/${NOISE}.out
 293  291                  if [ ! -f $SRC/${NOISE}.ref ]; then
 294  292                          cp $SRC/${NOISE}.out $SRC/${NOISE}.ref
 295  293                  fi
 296  294                  echo "\n==== Build noise differences ($LABEL) ====\n" \
 297  295                          >>$mail_msg_file
 298  296                  diff $SRC/${NOISE}.ref $SRC/${NOISE}.out >>$mail_msg_file
 299  297          fi
 300  298  
↓ open down ↓ 96 lines elided ↑ open up ↑
 397  395                  mv $lintdir/lint-noise.ref ${LINTNOISE}.ref
 398  396          fi
 399  397  
 400  398          rm -f $LINTOUT
 401  399          cd $lintdir
 402  400          #
 403  401          # Remove all .ln files to ensure a full reference file
 404  402          #
 405  403          rm -f Nothing_to_remove \
 406  404              `find . \( -name SCCS -o -name .hg -o -name .svn -o -name .git \) \
 407      -                -prune -o -type f -name '*.ln' -print `
      405 +                -prune -o -type f -name '*.ln' -print `
 408  406  
 409  407          /bin/time $MAKE -ek lint 2>&1 | \
 410  408              tee -a $LINTOUT >> $LOGFILE
 411  409  
 412  410          echo "\n==== '$MAKE lint' of $base ERRORS ====\n" >> $mail_msg_file
 413  411  
 414  412          grep "$MAKE:" $LINTOUT |
 415  413                  egrep -v "Ignoring unknown host" | \
 416  414                  tee $TMPDIR/lint_errs >> $mail_msg_file
 417  415          if [[ -s $TMPDIR/lint_errs ]]; then
↓ open down ↓ 299 lines elided ↑ open up ↑
 717  715  # If it comes interactively, it is generally TOOLS_PROTO, which will be
 718  716  # clobbered before the compiler version checks, which will therefore fail.
 719  717  #
 720  718  unset ONBLD_TOOLS
 721  719  
 722  720  #
 723  721  #       Setup environmental variables
 724  722  #
 725  723  if [ -f /etc/nightly.conf ]; then
 726  724          . /etc/nightly.conf
 727      -fi    
      725 +fi
 728  726  
 729  727  if [ -f $1 ]; then
 730  728          if [[ $1 = */* ]]; then
 731  729                  . $1
 732  730          else
 733  731                  . ./$1
 734  732          fi
 735  733  else
 736  734          if [ -f $OPTHOME/onbld/env/$1 ]; then
 737  735                  . $OPTHOME/onbld/env/$1
↓ open down ↓ 158 lines elided ↑ open up ↑
 896  894  # we export POUND_SIGN, RELEASE_DATE and DEV_CM to speed up the build process
 897  895  # by avoiding repeated shell invocations to evaluate Makefile.master
 898  896  # definitions.
 899  897  export POUND_SIGN RELEASE_DATE DEV_CM
 900  898  
 901  899  maketype="distributed"
 902  900  if [[ -z "$MAKE" ]]; then
 903  901          MAKE=dmake
 904  902  elif [[ ! -x "$MAKE" ]]; then
 905  903          echo "\$MAKE is set to garbage in the environment"
 906      -        exit 1  
      904 +        exit 1
 907  905  fi
 908  906  export PATH
 909  907  export MAKE
 910  908  
 911  909  if [ "${SUNWSPRO}" != "" ]; then
 912  910          PATH="${SUNWSPRO}/bin:$PATH"
 913  911          export PATH
 914  912  fi
 915  913  
 916  914  hostname=$(uname -n)
↓ open down ↓ 107 lines elided ↑ open up ↑
1024 1022  export ENVLDLIBS3 ENVCPPFLAGS1 ENVCPPFLAGS2 ENVCPPFLAGS3 ENVCPPFLAGS4 \
1025 1023          ENVLDLIBS1 ENVLDLIBS2 PARENT_ROOT
1026 1024  
1027 1025  PKGARCHIVE_ORIG=$PKGARCHIVE
1028 1026  
1029 1027  #
1030 1028  # Juggle the logs and optionally send mail on completion.
1031 1029  #
1032 1030  
1033 1031  function logshuffle {
1034      -        LLOG="$ATLOG/log.`date '+%F.%H:%M'`"
     1032 +        LLOG="$ATLOG/log.`date '+%F.%H:%M'`"
1035 1033          if [ -f $LLOG -o -d $LLOG ]; then
1036      -                LLOG=$LLOG.$$
     1034 +                LLOG=$LLOG.$$
1037 1035          fi
1038 1036  
1039 1037          rm -f "$ATLOG/latest" 2>/dev/null
1040 1038          mkdir -p $LLOG
1041 1039          export LLOG
1042 1040  
1043 1041          if [ "$build_ok" = "y" ]; then
1044 1042                  mv $ATLOG/proto_list_${MACH} $LLOG
1045 1043  
1046 1044                  if [ -f $ATLOG/proto_list_tools_${MACH} ]; then
1047 1045                          mv $ATLOG/proto_list_tools_${MACH} $LLOG
1048 1046                  fi
1049 1047  
1050 1048                  if [ -f $TMPDIR/wsdiff.results ]; then
1051      -                        mv $TMPDIR/wsdiff.results $LLOG
     1049 +                        mv $TMPDIR/wsdiff.results $LLOG
1052 1050                  fi
1053 1051  
1054 1052                  if [ -f $TMPDIR/wsdiff-nd.results ]; then
1055 1053                          mv $TMPDIR/wsdiff-nd.results $LLOG
1056 1054                  fi
1057 1055          fi
1058 1056  
1059 1057          #
1060 1058          # Now that we're about to send mail, it's time to check the noise
1061 1059          # file.  In the event that an error occurs beyond this point, it will
1062 1060          # be recorded in the nightly.log file, but nowhere else.  This would
1063 1061          # include only errors that cause the copying of the noise log to fail
1064 1062          # or the mail itself not to be sent.
1065 1063          #
1066 1064  
1067 1065          exec >>$LOGFILE 2>&1
1068 1066          if [ -s $build_noise_file ]; then
1069      -                echo "\n==== Nightly build noise ====\n" |
     1067 +                echo "\n==== Nightly build noise ====\n" |
1070 1068                      tee -a $LOGFILE >>$mail_msg_file
1071 1069                  cat $build_noise_file >>$LOGFILE
1072 1070                  cat $build_noise_file >>$mail_msg_file
1073 1071                  echo | tee -a $LOGFILE >>$mail_msg_file
1074 1072          fi
1075 1073          rm -f $build_noise_file
1076 1074  
1077 1075          case "$build_ok" in
1078 1076                  y)
1079 1077                          state=Completed
1080 1078                          ;;
1081 1079                  i)
1082 1080                          state=Interrupted
1083 1081                          ;;
1084 1082                  *)
1085      -                        state=Failed
     1083 +                        state=Failed
1086 1084                          ;;
1087 1085          esac
1088 1086  
1089 1087          if [[ $state != "Interrupted" && $build_extras_ok != "y" ]]; then
1090 1088                  state=Failed
1091 1089          fi
1092 1090  
1093 1091          NIGHTLY_STATUS=$state
1094 1092          export NIGHTLY_STATUS
1095 1093  
↓ open down ↓ 5 lines elided ↑ open up ↑
1101 1099          # if it is given.
1102 1100          #
1103 1101          mailx_r=
1104 1102          if [[ -n "${MAILFROM}" ]]; then
1105 1103                  mailx_r="-r ${MAILFROM}"
1106 1104          fi
1107 1105  
1108 1106          cat $build_time_file $build_environ_file $mail_msg_file \
1109 1107              > ${LLOG}/mail_msg
1110 1108          if [ "$m_FLAG" = "y" ]; then
1111      -                cat ${LLOG}/mail_msg | /usr/bin/mailx ${mailx_r} -s \
     1109 +                cat ${LLOG}/mail_msg | /usr/bin/mailx ${mailx_r} -s \
1112 1110          "Nightly ${MACH} Build of `basename ${CODEMGR_WS}` ${state}." \
1113 1111                          ${MAILTO}
1114 1112          fi
1115 1113  
1116 1114          if [ "$u_FLAG" = "y" -a "$build_ok" = "y" ]; then
1117      -                staffer cp ${LLOG}/mail_msg $PARENT_WS/usr/src/mail_msg-${MACH}
     1115 +                staffer cp ${LLOG}/mail_msg $PARENT_WS/usr/src/mail_msg-${MACH}
1118 1116                  staffer cp $LOGFILE $PARENT_WS/usr/src/nightly-${MACH}.log
1119 1117          fi
1120 1118  
1121 1119          mv $LOGFILE $LLOG
1122 1120  
1123 1121          ln -s "$LLOG" "$ATLOG/latest"
1124 1122  }
1125 1123  
1126 1124  #
1127 1125  #       Remove the locks and temporary files on any exit
1128 1126  #
1129 1127  function cleanup {
1130      -        logshuffle
     1128 +        logshuffle
1131 1129  
1132 1130          [ -z "$lockfile" ] || staffer rm -f $lockfile
1133 1131          [ -z "$atloglockfile" ] || rm -f $atloglockfile
1134 1132          [ -z "$ulockfile" ] || staffer rm -f $ulockfile
1135 1133          [ -z "$Ulockfile" ] || rm -f $Ulockfile
1136 1134  
1137 1135          set -- $newdirlist
1138 1136          while [ $# -gt 0 ]; do
1139 1137                  ISUSER=$1 staffer rmdir $2
1140 1138                  shift; shift
1141 1139          done
1142 1140          rm -rf $TMPDIR
1143 1141  }
1144 1142  
1145 1143  function cleanup_signal {
1146      -        build_ok=i
     1144 +        build_ok=i
1147 1145          # this will trigger cleanup(), above.
1148 1146          exit 1
1149 1147  }
1150 1148  
1151 1149  trap cleanup 0
1152 1150  trap cleanup_signal 1 2 3 15
1153 1151  
1154 1152  #
1155 1153  # Generic lock file processing -- make sure that the lock file doesn't
1156 1154  # exist.  If it does, it should name the build host and PID.  If it
↓ open down ↓ 198 lines elided ↑ open up ↑
1355 1353                  # Probe BRINGOVER_WS to determine its type
1356 1354                  if [[ $BRINGOVER_WS == ssh://* ]]; then
1357 1355                          scm_type="mercurial"
1358 1356                  elif [[ $BRINGOVER_WS == http://* ]] && \
1359 1357                      wget -q -O- --save-headers "$BRINGOVER_WS/?cmd=heads" | \
1360 1358                      egrep -s "application/mercurial" 2> /dev/null; then
1361 1359                          scm_type="mercurial"
1362 1360                  else
1363 1361                          scm_type="none"
1364 1362                  fi
1365      -        fi    
     1363 +        fi
1366 1364  
1367 1365          # fold both unsupported and unrecognized results into "none"
1368 1366          case "$scm_type" in
1369 1367          mercurial)
1370 1368                  ;;
1371 1369          *)      scm_type=none
1372 1370                  ;;
1373 1371          esac
1374 1372  
1375 1373          echo $scm_type
↓ open down ↓ 481 lines elided ↑ open up ↑
1857 1855                      ( cd $NIGHTLY_PARENT_ROOT-nd; umask 0; tar xpf - ) ) 2>&1 |
1858 1856                      tee -a $mail_msg_file >> $LOGFILE
1859 1857          fi
1860 1858          if [ -n "${NIGHTLY_PARENT_TOOLS_ROOT}" ]; then
1861 1859                  echo "\n==== Copying tools proto area to $NIGHTLY_PARENT_TOOLS_ROOT ====\n" | \
1862 1860                      tee -a $LOGFILE >> $mail_msg_file
1863 1861                  rm -rf $NIGHTLY_PARENT_TOOLS_ROOT/*
1864 1862                  mkdir -p $NIGHTLY_PARENT_TOOLS_ROOT
1865 1863                  if [[ "$MULTI_PROTO" = no || "$D_FLAG" = y ]]; then
1866 1864                          ( cd $TOOLS_PROTO; tar cf - . |
1867      -                            ( cd $NIGHTLY_PARENT_TOOLS_ROOT; 
     1865 +                            ( cd $NIGHTLY_PARENT_TOOLS_ROOT;
1868 1866                              umask 0; tar xpf - ) ) 2>&1 |
1869 1867                              tee -a $mail_msg_file >> $LOGFILE
1870 1868                  fi
1871 1869          fi
1872 1870  fi
1873 1871  
1874 1872  #
1875 1873  # ELF verification: ABI (-A) and runtime (-r) checks
1876 1874  #
1877 1875  if [[ ($build_ok = y) && (($A_FLAG = y) || ($r_FLAG = y)) ]]; then
↓ open down ↓ 8 lines elided ↑ open up ↑
1886 1884                  mv $elf_ddir $elf_ddir.ref
1887 1885          fi
1888 1886          mkdir -p $elf_ddir
1889 1887  
1890 1888          # Call find_elf to produce a list of the ELF objects in the proto area.
1891 1889          # This list is passed to check_rtime and interface_check, preventing
1892 1890          # them from separately calling find_elf to do the same work twice.
1893 1891          find_elf -fr $checkroot > $elf_ddir/object_list
1894 1892  
1895 1893          if [[ $A_FLAG = y ]]; then
1896      -                echo "\n==== Check versioning and ABI information ====\n"  | \
     1894 +                echo "\n==== Check versioning and ABI information ====\n"  | \
1897 1895                      tee -a $LOGFILE >> $mail_msg_file
1898 1896  
1899 1897                  # Produce interface description for the proto. Report errors.
1900 1898                  interface_check -o -w $elf_ddir -f object_list \
1901 1899                          -i interface -E interface.err
1902 1900                  if [[ -s $elf_ddir/interface.err ]]; then
1903 1901                          tee -a $LOGFILE < $elf_ddir/interface.err \
1904 1902                              >> $mail_msg_file
1905 1903                          build_extras_ok=n
1906 1904                  fi
1907 1905  
1908 1906                  # If ELF_DATA_BASELINE_DIR is defined, compare the new interface
1909 1907                  # description file to that from the baseline gate. Issue a
1910 1908                  # warning if the baseline is not present, and keep going.
1911 1909                  if [[ "$ELF_DATA_BASELINE_DIR" != '' ]]; then
1912 1910                          base_ifile="$ELF_DATA_BASELINE_DIR/interface"
1913 1911  
1914 1912                          echo "\n==== Compare versioning and ABI information" \
1915 1913                              "to baseline ====\n"  | \
1916 1914                              tee -a $LOGFILE >> $mail_msg_file
1917      -                        echo "Baseline:  $base_ifile\n" >> $LOGFILE
     1915 +                        echo "Baseline:  $base_ifile\n" >> $LOGFILE
1918 1916  
1919 1917                          if [[ -f $base_ifile ]]; then
1920 1918                                  interface_cmp -d -o $base_ifile \
1921 1919                                      $elf_ddir/interface > $elf_ddir/interface.cmp
1922 1920                                  if [[ -s $elf_ddir/interface.cmp ]]; then
1923 1921                                          echo | tee -a $LOGFILE >> $mail_msg_file
1924 1922                                          tee -a $LOGFILE < \
1925 1923                                              $elf_ddir/interface.cmp \
1926 1924                                              >> $mail_msg_file
1927 1925                                          build_extras_ok=n
1928 1926                                  fi
1929 1927                          else
1930      -                                echo "baseline not available. comparison" \
     1928 +                                echo "baseline not available. comparison" \
1931 1929                                      "skipped" | \
1932 1930                                      tee -a $LOGFILE >> $mail_msg_file
1933 1931                          fi
1934 1932  
1935 1933                  fi
1936 1934          fi
1937 1935  
1938 1936          if [[ $r_FLAG = y ]]; then
1939 1937                  echo "\n==== Check ELF runtime attributes ====\n" | \
1940 1938                      tee -a $LOGFILE >> $mail_msg_file
↓ open down ↓ 5 lines elided ↑ open up ↑
1946 1944                  else
1947 1945                          rtime_sflag="-s"
1948 1946                  fi
1949 1947                  check_rtime -i -m -v $rtime_sflag -o -w $elf_ddir \
1950 1948                          -D object_list  -f object_list -E runtime.err \
1951 1949                          -I runtime.attr.raw
1952 1950                  if (( $? != 0 )); then
1953 1951                          build_extras_ok=n
1954 1952                  fi
1955 1953  
1956      -                # check_rtime -I output needs to be sorted in order to 
     1954 +                # check_rtime -I output needs to be sorted in order to
1957 1955                  # compare it to that from previous builds.
1958 1956                  sort $elf_ddir/runtime.attr.raw > $elf_ddir/runtime.attr
1959 1957                  rm $elf_ddir/runtime.attr.raw
1960 1958  
1961 1959                  # Report errors
1962 1960                  if [[ -s $elf_ddir/runtime.err ]]; then
1963 1961                          tee -a $LOGFILE < $elf_ddir/runtime.err \
1964 1962                                  >> $mail_msg_file
1965 1963                          build_extras_ok=n
1966 1964                  fi
↓ open down ↓ 20 lines elided ↑ open up ↑
1987 1985                  p_elf_ddir=$PARENT_WS/usr/src/ELF-data.$MACH
1988 1986  
1989 1987                  # If parent lacks the ELF-data.$MACH directory, create it
1990 1988                  if [[ ! -d $p_elf_ddir ]]; then
1991 1989                          staffer mkdir -p $p_elf_ddir
1992 1990                  fi
1993 1991  
1994 1992                  # These files are used asynchronously by other builds for ABI
1995 1993                  # verification, as above for the -A option. As such, we require
1996 1994                  # the file replacement to be atomic. Copy the data to a temp
1997      -                # file in the same filesystem and then rename into place. 
     1995 +                # file in the same filesystem and then rename into place.
1998 1996                  (
1999 1997                          cd $elf_ddir
2000 1998                          for elf_dfile in *; do
2001 1999                                  staffer cp $elf_dfile \
2002 2000                                      ${p_elf_ddir}/${elf_dfile}.new
2003 2001                                  staffer mv -f ${p_elf_ddir}/${elf_dfile}.new \
2004 2002                                      ${p_elf_ddir}/${elf_dfile}
2005 2003                          done
2006 2004                  )
2007 2005          fi
↓ open down ↓ 168 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX