diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/tools/env/developer.sh | 6 | ||||
-rw-r--r-- | usr/src/tools/env/gatekeeper.sh | 6 | ||||
-rw-r--r-- | usr/src/tools/env/opensolaris.sh | 6 | ||||
-rw-r--r-- | usr/src/tools/scripts/nightly.1 | 10 | ||||
-rw-r--r-- | usr/src/tools/scripts/nightly.sh | 9 |
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 |