summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorrscott <none@none>2006-07-27 13:36:16 -0700
committerrscott <none@none>2006-07-27 13:36:16 -0700
commit40bc9153236fa42f7cbe2c25c5476e8703eb7894 (patch)
tree15b31a69dcdb603016b0cb633676db7fa29bf3f6 /usr/src
parent44bed9d7e21975b68d41a2a54db2aa0581429ca6 (diff)
downloadillumos-joyent-40bc9153236fa42f7cbe2c25c5476e8703eb7894.tar.gz
6451253 6451117 should have spent a bit more time in code review
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/tools/env/developer.sh6
-rw-r--r--usr/src/tools/env/gatekeeper.sh6
-rw-r--r--usr/src/tools/env/opensolaris.sh6
-rw-r--r--usr/src/tools/scripts/nightly.110
-rw-r--r--usr/src/tools/scripts/nightly.sh9
5 files changed, 22 insertions, 15 deletions
diff --git a/usr/src/tools/env/developer.sh b/usr/src/tools/env/developer.sh
index adbef16a9f..b33f4e626a 100644
--- a/usr/src/tools/env/developer.sh
+++ b/usr/src/tools/env/developer.sh
@@ -215,8 +215,6 @@ UT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING
# over deleted_files or other nifty directories.
#BRINGOVER_FILES="usr deleted_files"
-# POST_NIGHTLY can be any command to be run at the end of nightly.
-# As its first and only argument, the command will be provided the return
-# status of nightly - one of "Completed", "Interrupted", or "Failed"
-# The log file will be available at $LOGFILE
+# POST_NIGHTLY can be any command to be run at the end of nightly. See
+# nightly(1) for interactions between environment variables and this command.
#POST_NIGHTLY=
diff --git a/usr/src/tools/env/gatekeeper.sh b/usr/src/tools/env/gatekeeper.sh
index 0088afdbd7..6dcf9f0112 100644
--- a/usr/src/tools/env/gatekeeper.sh
+++ b/usr/src/tools/env/gatekeeper.sh
@@ -225,8 +225,6 @@ UT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING
# over deleted_files or other nifty directories.
#BRINGOVER_FILES="usr deleted_files"
-# POST_NIGHTLY can be any command to be run at the end of nightly.
-# As its first and only argument, the command will be provided the return
-# status of nightly - one of "Completed", "Interrupted", or "Failed"
-# The log file will be available at $LOGFILE
+# POST_NIGHTLY can be any command to be run at the end of nightly. See
+# nightly(1) for interactions between environment variables and this command.
#POST_NIGHTLY=
diff --git a/usr/src/tools/env/opensolaris.sh b/usr/src/tools/env/opensolaris.sh
index aeb8515acd..ecfc44d79b 100644
--- a/usr/src/tools/env/opensolaris.sh
+++ b/usr/src/tools/env/opensolaris.sh
@@ -191,8 +191,6 @@ SPRO_VROOT=$SPRO_ROOT; export SPRO_VROOT
# over deleted_files or other nifty directories.
#BRINGOVER_FILES="usr deleted_files"
-# POST_NIGHTLY can be any command to be run at the end of nightly.
-# As its first and only argument, the command will be provided the return
-# status of nightly - one of "Completed", "Interrupted", or "Failed"
-# The log file will be available at $LOGFILE
+# POST_NIGHTLY can be any command to be run at the end of nightly. See
+# nightly(1) for interactions between environment variables and this command.
#POST_NIGHTLY=
diff --git a/usr/src/tools/scripts/nightly.1 b/usr/src/tools/scripts/nightly.1
index de9c66f54d..03a0479acd 100644
--- a/usr/src/tools/scripts/nightly.1
+++ b/usr/src/tools/scripts/nightly.1
@@ -441,6 +441,16 @@ safe to use. Set this flag to 'n' to disable this test, allowing any
version of dmake to be used.
.RE
.LP
+.B POST_NIGHTLY
+.RS 5
+The command specified here will be executed at the end of nightly. The
+return status of nightly - one of "Completed", "Interrupted", or "Failed" -
+will be available in the environment variable NIGHTLY_STATUS. Any other
+environment variables exported in the environment file or by nightly are
+available, although these are not stable, and should be checked before use.
+The command output will be appended to the mail message and log file.
+.RE
+.LP
.SH REALMODE ENVIRONMENT VARIABLES
.LP
The following environment variables referenced by
diff --git a/usr/src/tools/scripts/nightly.sh b/usr/src/tools/scripts/nightly.sh
index da44ed4eb1..92b295e6bc 100644
--- a/usr/src/tools/scripts/nightly.sh
+++ b/usr/src/tools/scripts/nightly.sh
@@ -1422,10 +1422,13 @@ logshuffle() {
state=Failed
;;
esac
+ NIGHTLY_STATUS=$state
+ export NIGHTLY_STATUS
- if [ -x "$POST_NIGHTLY" ]; then
- echo "\n==== Running POST_NIGHTLY command: $POST_NIGHTLY ====" >> $mail_msg_file
- $POST_NIGHTLY $state >> $mail_msg_file 2>&1
+ if [ -n "$POST_NIGHTLY" ]; then
+ echo "\n==== Running POST_NIGHTLY command:" \
+ "$POST_NIGHTLY ====\n" | tee -a $mail_msg_file >> $LOGFILE
+ $POST_NIGHTLY $state 2>&1 | tee -a $mail_msg_file >> $LOGFILE
fi
cat $build_time_file $mail_msg_file > ${LLOG}/mail_msg