summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2021-06-05 18:39:05 -0500
committerRichard Lowe <richlowe@richlowe.net>2021-06-16 18:11:47 -0500
commit26e7d9a88aea4fa6939315466aa8b8b9946409d8 (patch)
tree354ee2b7230e33b7cfeb99a3d114079b77551479
parentb7afa311209be3c026130832cda2a5199c7f44e1 (diff)
downloadillumos-joyent-26e7d9a88aea4fa6939315466aa8b8b9946409d8.tar.gz
13856 findunref runs too early
Reviewed by: Andy Fiddaman <andy@omnios.org> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Gordon Ross <gordon.w.ross@gmail.com>
-rwxr-xr-xusr/src/tools/scripts/nightly85
1 files changed, 42 insertions, 43 deletions
diff --git a/usr/src/tools/scripts/nightly b/usr/src/tools/scripts/nightly
index 8d65890e1f..72bc1f2c3e 100755
--- a/usr/src/tools/scripts/nightly
+++ b/usr/src/tools/scripts/nightly
@@ -655,7 +655,7 @@ if [ -f /etc/nightly.conf ]; then
fi
if [ -f $1 ]; then
- if [[ $1 = */* ]]; then
+ if [[ $1 == */* ]]; then
. $1
else
. ./$1
@@ -843,19 +843,19 @@ if [ "${SUNWSPRO}" != "" ]; then
fi
hostname=$(uname -n)
-if [[ $DMAKE_MAX_JOBS != +([0-9]) || $DMAKE_MAX_JOBS -eq 0 ]]
+if [[ $DMAKE_MAX_JOBS != +([0-9]) || $DMAKE_MAX_JOBS == 0 ]]
then
maxjobs=
if [[ -f $HOME/.make.machines ]]
then
# Note: there is a hard tab and space character in the []s
# below.
- egrep -i "^[ ]*$hostname[ \.]" \
+ egrep -i "^[ ]*${hostname}[ \.]" \
$HOME/.make.machines | read host jobs
maxjobs=${jobs##*=}
fi
- if [[ $maxjobs != +([0-9]) || $maxjobs -eq 0 ]]
+ if [[ $maxjobs != +([0-9]) || $maxjobs == 0 ]]
then
# default
maxjobs=4
@@ -1119,7 +1119,7 @@ function create_lock {
function allprotos {
typeset roots="$ROOT"
- if [[ "$F_FLAG" = n && "$MULTI_PROTO" = yes ]]; then
+ if [[ "$F_FLAG" == n && "$MULTI_PROTO" == yes ]]; then
roots="$roots $ROOT-nd"
fi
@@ -1338,7 +1338,7 @@ if [ "$i_FLAG" = "n" -a -d "$SRC" ]; then
build_extras_ok=n
fi
- if [[ "$t_FLAG" = "y" ]]; then
+ if [[ "$t_FLAG" == "y" ]]; then
echo "\n==== Make tools clobber at `date` ====\n" >> $LOGFILE
cd ${TOOLS}
rm -f ${TOOLS}/clobber-${MACH}.out
@@ -1533,7 +1533,7 @@ if [ "$n_FLAG" = "n" ]; then
# $CODEMGR_WS. If so, then SCM_TYPE was previously "none,"
# but should now be the same as $BRINGOVER_WS.
#
- [[ $SCM_TYPE = none ]] && SCM_TYPE=$PARENT_SCM_TYPE
+ [[ $SCM_TYPE == none ]] && SCM_TYPE=$PARENT_SCM_TYPE
run_hook POST_BRINGOVER
@@ -1548,7 +1548,7 @@ fi
[[ -d "${CODEMGR_WS}" ]] || fatal_error "Error: ${CODEMGR_WS} is not a directory."
[[ -f "${CODEMGR_WS}/usr/src/Makefile" ]] || fatal_error "Error: ${CODEMGR_WS}/usr/src/Makefile not found."
-if [[ "$t_FLAG" = "y" ]]; then
+if [[ "$t_FLAG" == "y" ]]; then
set_non_debug_build_flags
bootstrap_tools || fatal_error "Error: could not bootstrap tools"
@@ -1627,7 +1627,7 @@ fi
#
# Build and use the workspace's tools if requested
#
-if [[ "$t_FLAG" = "y" ]]; then
+if [[ "$t_FLAG" == "y" ]]; then
set_non_debug_build_flags
build_tools ${TOOLS_PROTO}
@@ -1668,13 +1668,35 @@ normal_build
ORIG_SRC=$SRC
BINARCHIVE=${CODEMGR_WS}/bin-${MACH}.cpio.Z
+abspkg=
+for d in $abssrcdirs; do
+ if [ -d "$d/pkg" ]; then
+ abspkg="$abspkg $d"
+ fi
+done
+
+if [ "$L_FLAG" != "y" -a "$build_ok" = y ]; then
+ echo "\n==== Linting packages ====\n" | \
+ tee -a $LOGFILE >> $mail_msg_file
+
+ if [ -n "$abspkg" ]; then
+ for d in "$abspkg"; do
+ ( cd $d/pkg ; $MAKE -e pkglint ) | \
+ tee -a $LOGFILE | \
+ egrep -v 'Lint engine setup|Starting lint run'
+ done 2>&1 | tee $TMPDIR/pkglint_noise >> $mail_msg_file
+ if [[ -s $TMPDIR/pkglint_noise ]]; then
+ build_extras_ok=n
+ fi
+ fi
+fi
#
# There are several checks that need to look at the proto area, but
# they only need to look at one, and they don't care whether it's
# DEBUG or non-DEBUG.
#
-if [[ "$MULTI_PROTO" = yes && "$D_FLAG" = n ]]; then
+if [[ "$MULTI_PROTO" == yes && "$D_FLAG" == n ]]; then
checkroot=$ROOT-nd
else
checkroot=$ROOT
@@ -1754,12 +1776,12 @@ if [ "$U_FLAG" = "y" -a "$build_ok" = "y" ]; then
rm -rf $NIGHTLY_PARENT_ROOT/*
unset Ulockfile
mkdir -p $NIGHTLY_PARENT_ROOT
- if [[ "$MULTI_PROTO" = no || "$D_FLAG" = y ]]; then
+ if [[ "$MULTI_PROTO" == no || "$D_FLAG" == y ]]; then
( cd $ROOT; tar cf - . |
( cd $NIGHTLY_PARENT_ROOT; umask 0; tar xpf - ) ) 2>&1 |
tee -a $mail_msg_file >> $LOGFILE
fi
- if [[ "$MULTI_PROTO" = yes && "$F_FLAG" = n ]]; then
+ if [[ "$MULTI_PROTO" == yes && "$F_FLAG" == n ]]; then
rm -rf $NIGHTLY_PARENT_ROOT-nd/*
mkdir -p $NIGHTLY_PARENT_ROOT-nd
cd $ROOT-nd
@@ -1772,7 +1794,7 @@ if [ "$U_FLAG" = "y" -a "$build_ok" = "y" ]; then
tee -a $LOGFILE >> $mail_msg_file
rm -rf $NIGHTLY_PARENT_TOOLS_ROOT/*
mkdir -p $NIGHTLY_PARENT_TOOLS_ROOT
- if [[ "$MULTI_PROTO" = no || "$D_FLAG" = y ]]; then
+ if [[ "$MULTI_PROTO" == no || "$D_FLAG" == y ]]; then
( cd $TOOLS_PROTO; tar cf - . |
( cd $NIGHTLY_PARENT_TOOLS_ROOT;
umask 0; tar xpf - ) ) 2>&1 |
@@ -1784,7 +1806,7 @@ fi
#
# ELF verification: ABI (-A) and runtime (-r) checks
#
-if [[ ($build_ok = y) && (($A_FLAG = y) || ($r_FLAG = y)) ]]; then
+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
@@ -1802,7 +1824,7 @@ if [[ ($build_ok = y) && (($A_FLAG = y) || ($r_FLAG = y)) ]]; then
# them from separately calling find_elf to do the same work twice.
find_elf -fr $checkroot > $elf_ddir/object_list
- if [[ $A_FLAG = y ]]; then
+ if [[ $A_FLAG == y ]]; then
echo "\n==== Check versioning and ABI information ====\n" | \
tee -a $LOGFILE >> $mail_msg_file
@@ -1845,13 +1867,13 @@ if [[ ($build_ok = y) && (($A_FLAG = y) || ($r_FLAG = y)) ]]; then
fi
fi
- if [[ $r_FLAG = y ]]; then
+ if [[ $r_FLAG == y ]]; then
echo "\n==== Check ELF runtime attributes ====\n" | \
tee -a $LOGFILE >> $mail_msg_file
# If we're doing a DEBUG build the proto area will be left
# with debuggable objects, thus don't assert -s.
- if [[ $D_FLAG = y ]]; then
+ if [[ $D_FLAG == y ]]; then
rtime_sflag=""
else
rtime_sflag="-s"
@@ -1893,7 +1915,7 @@ if [[ ($build_ok = y) && (($A_FLAG = y) || ($r_FLAG = y)) ]]; then
fi
# If -u set, copy contents of ELF-data.$MACH to the parent workspace.
- if [[ "$u_FLAG" = "y" ]]; then
+ if [[ "$u_FLAG" == "y" ]]; then
p_elf_ddir=$PARENT_WS/usr/src/ELF-data.$MACH
# If parent lacks the ELF-data.$MACH directory, create it
@@ -1981,13 +2003,6 @@ if [ "$CHECK_PATHS" = y -a "$N_FLAG" != y ]; then
fi
fi
-abspkg=
-for d in $abssrcdirs; do
- if [ -d "$d/pkg" ]; then
- abspkg="$abspkg $d"
- fi
-done
-
if [ "$M_FLAG" != "y" -a "$build_ok" = y ]; then
echo "\n==== Impact on file permissions ====\n" \
>> $mail_msg_file
@@ -1999,28 +2014,12 @@ if [ "$M_FLAG" != "y" -a "$build_ok" = y ]; then
fi
fi
-if [ "$L_FLAG" != "y" -a "$build_ok" = y ]; then
- echo "\n==== Linting packages ====\n" | \
- tee -a $LOGFILE >> $mail_msg_file
-
- if [ -n "$abspkg" ]; then
- for d in "$abspkg"; do
- ( cd $d/pkg ; $MAKE -e pkglint ) | \
- tee -a $LOGFILE | \
- egrep -v 'Lint engine setup|Starting lint run'
- done 2>&1 | tee $TMPDIR/pkglint_noise >> $mail_msg_file
- if [[ -s $TMPDIR/pkglint_noise ]]; then
- build_extras_ok=n
- fi
- fi
-fi
-
if [ "$w_FLAG" = "y" -a "$build_ok" = "y" ]; then
- if [[ "$MULTI_PROTO" = no || "$D_FLAG" = y ]]; then
+ if [[ "$MULTI_PROTO" == no || "$D_FLAG" == y ]]; then
do_wsdiff DEBUG $ROOT.prev $ROOT
fi
- if [[ "$MULTI_PROTO" = yes && "$F_FLAG" = n ]]; then
+ if [[ "$MULTI_PROTO" == yes && "$F_FLAG" == n ]]; then
do_wsdiff non-DEBUG $ROOT-nd.prev $ROOT-nd
fi
fi