1 jim.wunderlich 1.1 #!/bin/bash
2
3 #### bash shell
4
5 ##############################################################################
6 ##############################################################################
7 ##
8 ## pegasus nightly run script
9 ##
10 ## This script presumes that CVS, Complier and GNU make are all installed
11 ## and pathed.
12 ##
13 ## It will checkout the tree, build it, and run test.
14 ##
15 ## There is a status output file that is output to during the running of
16 ## the script (running_status_file) and the results are summarized in the
17 ## mail file (mail_file) that will be mailed to the selected destination.
18 ##
19 ## The nightly directory will contain the following after the script has
20 ## been run.
21 ##
22 jim.wunderlich 1.1 ## all_out pegasus runtime
23 ## cvs_co_out poststarttests_out standardtests_out
24 ## mail_file perftests_out
25 ## patch_out running_status_file tests_out
26 ##
27 ## There are sevearl execution steps within the script that can be
28 ## configured to TO_RUN or NOT_TO_RUN. Each step outputs to a file based on
29 ## its name by appending "_out"
30 ##
31 ## The steps are:
32 ##
33 ## STEP NAME OUTPUT FILE DESCRIPTION
34 ## ---------- ---------------------- ------------
35 ## cvs_co cvs_co_out file checkout
36 ## all all_out build source tree
37 ## tests test_out runs the unit tests
38 ## perftests perftests_out runs perftest
39 ## poststarttests poststarttests_out runs server tests
40 ## standardtests standardtests_out runs more server tests
41 ##
42 #############################################################################
43 jim.wunderlich 1.1 #############################################################################
44 ##
45 ## Set up the configuration for the nightly build
46 ##
47 ## There are three configuration areas.
48 ## 1. The variables that may be changed between runs to test different things
49 ## 2. Tha variables to be changed to set this script up for a particular system
50 ## 3. The variables to be changed to contrl the PEGASUS build evironment
51 ##
52
53 #############################################################################
54 #############################################################################
55 ## CONFIG area 1 - Variables to control the run charecteristics
56 ##
57 ##
58 ## The starting status of each step is set to TO_RUN. This string is
59 ## also used to initialize the respective output file
60 ## for that step.
61 ##
62 ## If the step status is set to the special string "NOT_TO_RUN" then
63 ## that step will be skipped.
64 jim.wunderlich 1.1 ##
65
66 cvs_co_status=TO_RUN
67 patch_status=TO_RUN
68 all_status=TO_RUN
69 tests_status=TO_RUN
70 perftests_status=TO_RUN
71 poststarttests_status=TO_RUN
72 standardtests_status=TO_RUN
73
74
75 status=NOT_DONE
76
77 ##
78 ## The RUN_NUM string is appended to theoutput files name and can be used to
79 ## prevent overwriting output files from previous runs.
80 ##
81 RUN_NUM="" # string appended to the output files
82 ###RUN_NUM="2"
83
84 ##############################################################################
85 jim.wunderlich 1.1 ##############################################################################
86 ## CONFIG area 2 - Variables to setup this script to run on a particular system
87 ##
88
89 ##
90 ## export the CVS repository info
91 ##
92 ## for user anon the password is anon you will have to do a cvs login
93 ## one time on your machine. After that CVS will remember the password
94 ##
95 ## CVS_USER_PASSWD=anon
96 ##
97 CVS_USER=anon
98
99 export CVSROOT=:pserver:${CVS_USER}@cvs.opengroup.org:/cvs/MSB
100
101 MOD_NAME="pegasus" # module to checkout to name pegasus
|
102 jim.wunderlich 1.9 MOD_DIR_NAME=$MOD_NAME # directory name to checkout MODULE into
103 MOD_REV="HEAD" # revision to checkout
104 ## MOD_REV="RELEASE_2_5-branch" # this would checkout the 2.5 Release Branch
|
105 jim.wunderlich 1.1
106 ##
107 ## Set up the diretory names and export the PEGASUS env variables
108 ##
109 PEG_LOC_ROOT=~wunder/peg ## directory where the nightly directory is
110
111 dirName=TOGnightly ## nightly directory name
112 ##dirName=INnightly ## nightly directory name
113
114 cd $PEG_LOC_ROOT
115
116 BASE_DIR=$PEG_LOC_ROOT/$dirName
117
118 OS_NAME_VER="SUSE 9.2 Pro" # set the OS name for the report
119 ## OS_NAME_VER="SunOS 5.8"
120 CPU_TYPE="Intel Pentium III" # set the CPU type for the report
121 CPU_FREQ="800 Mhz" # set the CPU freq for the report
122 CPU_CNT="1" # set the number of CPU's for the report
123
124 export PEGASUS_PLATFORM=LINUX_IX86_GNU
|
125 jim.wunderlich 1.2 ## export PEGASUS_PLATFORM=SOLARIS_SPARC_GNU
|
126 jim.wunderlich 1.1
127 export PEGASUS_ROOT=$BASE_DIR/pegasus
128 export PEGASUS_HOME=$BASE_DIR/runtime
129
130 export PATH=$PATH:$PEGASUS_HOME/bin ## set path to include the pegaus bin dir
131
132
133 PATCH_FILE=$BASE_DIR/../SW_changes_TOG ## set the Patch File location
134 PATCH_ERRORS=$BASE_DIR/patching_errors_TOG ## set the patch errors file location
135
136 MAIL_TO="pegasus-build-status@opengroup.org"
137
138 ###############################################################################
139 ###############################################################################
140 ## CONFIG area 3 - Variables to control the pegasus build charecteristics
141 ##
142
143
144 ######################################################
145 ## PEGASUS_HAS_SSL specifies SSL is to be compiled on
146 ## OPENSSL_BIN specifies the location of the OpenSSL binary.
147 jim.wunderlich 1.1 ## OPENSSL_HOME Specifies the location of the OpenSSL SDK directory.
148 ## This directory must contain the OpenSSL include and library directory.
149 ##
150 ## export PEGASUS_HAS_SSL=true
151 ## export OPENSSL_BIN=TBD_PATH
152 ## export OPENSSL_HOME=TBD_PATH
153 ## PEGASUS_ENABLE_SSLV2=true
154 ##
155 ## export PEGASUS_HAS_SSL=true
156 ## export OPENSSL_HOME=/usr ## needed on SUSE Linux
157
158 ######################################################
159 ## Controls how repository is built.
160 ##
161 ## PEGASUS_REPOSITORY_MODE= XML or BIN
162 ## PEGASUS_ENABLE_COMPRESSED_REPOSITORY Enables compressed repository
163 ## PEGASUS_ENABLE_COMPRESSED_REPOSITORY=true
164 ##
165
166 ######################################################
167 ## Controls Service Locator Protocol
168 jim.wunderlich 1.1 ##
169 ## PEGASUS_ENABLE_SLP Enables Service Locator Protocol.
170 ## SLP is used in discovery of CIMOMs location.
171 ##
172 ## PEGASUS_ENABLE_SLP=true
173 ##
174
175 ######################################################
176 ## Controls Debugging Capabilities
177 ##
178 ## PEGASUS_NOASSERTS Remove asserts
179 ## PEGASUS_DEBUG enables build with symble tables
180 ## PEGASUS_DISABLE_DEPRECATED_INTERFACES Removes deprecated symbol definitions
181 ## PEGASUS_EXTRA_C_FLAGS Extra C compiler flags,
182 ## PEGASUS_EXTRA_CXX_FLAGS Extra C++ compiler flags
183 ## PEGASUS_EXTRA_LINK_FLAGS Extra link flag,
184 ## PEGASUS_TEST_VERBOSE Sets verbose mode for most of the tests
185 ##
186 ## export PEGASUS_DEBUG=true
187 ## export PEGASUS_NOASSERTS=true
188 ## export PEGASUS_DISABLE_DEPRECATED_INTERFACES=true
189 jim.wunderlich 1.1 ## export PEGASUS_TEST_VERBOSE=true
190 ##
191 export PEGASUS_DEBUG=true
192
193 ######################################################
194 ## Internationalization support
195 ##
196 ## PEGASUS_HAS_MESSAGES Enable localization support,
197 ## ICU_INSTALL Directory with ICU libraries
198 ## ICU_ROOT Directory with ICU source code,
199 ##
200 ## export PEGASUS_HAS_MESSAGES=true
201 ##
202
203 #####################################################
204 ## CQL language support
205 ##
206 ## PEGASUS_DISABLE_CQL Disables CQL language support
207 ##
208 ## export PEGASUS_DISABLE_CQL=true
209 ##
210 jim.wunderlich 1.1
|
211 jim.wunderlich 1.2 #####################################################
212 ##
213 ## PEGASUS_DISABLE_PROV_USERCTXT
|
214 jim.wunderlich 1.8 ## PEGASUS_DISABLE_PROV_USERCTXT_REQUESTOR
215 ## PEGASUS_DISABLE_PROV_USERCTXT_DESIGNATED
216 ## PEGASUS_DISABLE_PROV_USERCTXT_PRIVILEGED
217 ## PEGASUS_DISABLE_PROV_USERCTXT_CIMSERVER
|
218 jim.wunderlich 1.2 ##
|
219 jim.wunderlich 1.8 ## User context authorization
|
220 jim.wunderlich 1.2 ##
221 ## Builds a version of OpenPegasus that disables supports for the Provider
222 ## User Context feature. This feature allows a Provider to choose the
223 ## user context in which it is invoked, including the ability to run in
224 ## the context of the user requesting an operation.
225 ##
|
226 jim.wunderlich 1.8 ## export PEGASUS_DISABLE_PROV_USERCTXT=true
227 ## export PEGASUS_DISABLE_PROV_USERCTXT_REQUESTOR=true
228 ## export PEGASUS_DISABLE_PROV_USERCTXT_DESIGNATED=true
229 ## export PEGASUS_DISABLE_PROV_USERCTXT_PRIVILEGED=true
230 ## export PEGASUS_DISABLE_PROV_USERCTXT_CIMSERVER=true
|
231 jim.wunderlich 1.2
232 export PEGASUS_DISABLE_PROV_USERCTXT=true
233
|
234 jim.wunderlich 1.4
235 #####################################################
236 ##
237 ## PEGASUS_DEFAULT_ENABLE_OOP
238 ##
239 ## set the servers default value for OOP
240 ##
241 ## When set to true, the Out-of-Process Providers feature is enabled.
242 ## (forceProviderProcesses=false).
243 ## When set to false, the Out-of-Process Providers feature is disabled.
244 ## (forceProviderProcesses=true).
245 ##
246 ## export PEGASUS_DEFAULT_ENABLE_OOP=true
247 ## export PEGASUS_DEFAULT_ENABLE_OOP=false
248 ##
249
250 export PEGASUS_DEFAULT_ENABLE_OOP=false
251
252
|
253 jim.wunderlich 1.3 #####################################################
254 ##
|
255 jim.wunderlich 1.4 ## PEGASUS_DISABLE_PRIVILEGED_TESTS
256 ##
|
257 jim.wunderlich 1.8 ## turn privileged test off
|
258 jim.wunderlich 1.4 ##
259 ## export PEGASUS_DISABLE_PRIVILEGED_TESTS=true
|
260 jim.wunderlich 1.3 ##
|
261 jim.wunderlich 1.4
262 export PEGASUS_DISABLE_PRIVILEGED_TESTS=true
263
264
265 ######################################################
|
266 jim.wunderlich 1.3 ##
|
267 jim.wunderlich 1.4 ## PEGASUS_USE_MU_DEPEND
|
268 jim.wunderlich 1.3 ##
|
269 jim.wunderlich 1.4 ## Set linux to use the mu depend.
|
270 jim.wunderlich 1.3 ##
|
271 jim.wunderlich 1.4 ## use this if makedepend is not installed on Linux
|
272 jim.wunderlich 1.3 ##
|
273 jim.wunderlich 1.4 ## export PEGASUS_USE_MU_DEPEND=true
|
274 jim.wunderlich 1.3 ##
275
276
|
277 jim.wunderlich 1.2
278
|
279 jim.wunderlich 1.1 ##############################################################################
280 ##############################################################################
281 ##############################################################################
282 ##############################################################################
283 #####
284 ##### DO NOT MAKE EDITS BELOW THIS POINT
285 #####
286 ##### The rest of the file should not need to be edited.
287 #####
288 ##### All the speciic configuration parameters should be above this
289 ##### demarcation point. Everthing below uses the configuration data
290 ##### and runs the requested tests outputing the results to the output files
291 ##### and the "running_status_file" and the summary "mail_file"
292 #####
293 ##############################################################################
294 ##############################################################################
295 ##############################################################################
296 ##############################################################################
297
|
298 jim.wunderlich 1.5 ## set variable to cvs revisionnumber
|
299 jim.wunderlich 1.9 PEG_NIGHTLY_REV="\$Revision: 1.8 $"
|
300 jim.wunderlich 1.1
301
302 ##############################################################################
303 ##############################################################################
304 ##
305 ## Function defintions
306 ##
307
308 ##################
309 # function to put output to the $status_file
310 #
311 function STATUS_OUT()
312 {
313 echo "$1" ;
314 echo "$1" >> $status_file ;
315 return 0 ;
316 }
317
318 ##################
319 # function to put output to the $MAIL_FILE
320 #
321 jim.wunderlich 1.1 function MAIL_OUT()
322 {
323 echo "$1" >> $MAIL_FILE ;
324 return 0 ;
325 }
326
327 ##################
328 # Function to initialise the step file name and to initialze the file
329 #
330 # Creates the output file and the assigns its name to a variable
331 #
332 # eg: for the step called tests the following will be created
333 # $tests_out_file set to $BASE_DIR/tests_out$RUN_NUM
334 # and the initial step status will be output to the file
335 #
336 # create the output file names
337 # tests_out_file=$BASE_DIR/tests_out$RUN_NUM
338 # create the output files
339 # echo "$tests_status" > $tests_out_file
340 #
341 function INIT_STEP_FILE()
342 jim.wunderlich 1.1 {
343 CMD=$1
344 out_file=${CMD}_out_file
345 name=${CMD}_out
346 step_status=${CMD}_status
347 step_start_time=${CMD}_start_time
348 step_stop_time=${CMD}_stop_time
349
350 export $step_start_time=NA
351 export $step_stop_time=NA
352
353 #create the output file name
354 export $out_file=$BASE_DIR/$name$RUN_NUM
355
356 #create the output file
357 echo ${!step_status} > ${!out_file}
358 }
359
360
361 ##################
362 # function to execute the step for a Makefile step
363 jim.wunderlich 1.1 #
364 function EXEC_MAKE_STEP()
365 {
366 CMD=$1
367 out_file=${CMD}_out_file
368 step_status=${CMD}_status
369 step_start_time=${CMD}_start_time
370 step_stop_time=${CMD}_stop_time
371
372 if [ "${!step_status}" != "NOT_TO_RUN" ] ; then
373
374 STATUS_OUT "make -s $CMD started at `$TIME_CMD` "
375
376 export $step_start_time=`$TIME_CMD`
377
378 if make -s $CMD 1>${!out_file} 2>&1
379 then
380 export $step_status="SUCCESS"
381 else
382 export $step_status="FAILURE"
383 fi
384 jim.wunderlich 1.1
385 export $step_stop_time=`$TIME_CMD`
386
387 fi
388
389 STATUS_OUT "make $CMD ${!step_status} at `$TIME_CMD` "
390
391 }
392
393 ##################
394 # function to execute the step for a TestMakefile step
395 #
396 function EXEC_TESTMAKE_STEP()
397 {
398 CMD=$1
399 out_file=${CMD}_out_file
400 step_status=${CMD}_status
401 step_start_time=${CMD}_start_time
402 step_stop_time=${CMD}_stop_time
403
404
405 jim.wunderlich 1.1 if [ "${!step_status}" != "NOT_TO_RUN" ] ; then
406 STATUS_OUT "make $CMD started at `$TIME_CMD` "
407
408 export $step_start_time=`$TIME_CMD`
409
410 if time make -f TestMakefile -s $CMD 1>>${!out_file} 2>&1
411 then
412 export $step_status="SUCCESS"
413 else
414 export $step_status="FAILURE"
415 fi
416
417 export $step_stop_time=`$TIME_CMD`
418
419 fi
420
421 STATUS_OUT "make $CMD ${!step_status} at `$TIME_CMD` "
422
423 }
424
425 ##################
426 jim.wunderlich 1.1 # function to output status for a step
427 #
428 function REPORT_STEP_STATUS ()
429 {
430 CMD=$1
431 out_file=${CMD}_out_file
432 step_status=${CMD}_status
433 step_start_time=${CMD}_start_time
434 step_stop_time=${CMD}_stop_time
435
436 MAIL_OUT "Make $CMD Status: ${!step_status}"
437 MAIL_OUT "Make $CMD Start Time: ${!step_start_time}"
438 MAIL_OUT "Make $CMD Stop Time: ${!step_stop_time}"
439 MAIL_OUT " "
440
441 }
442
443 ##################
444 # function to output report for a step
445 #
446 function REPORT_STEP ()
447 jim.wunderlich 1.1 {
448 CMD=$1
449 CNT=$2
450 out_file=${CMD}_out_file
451 step_status=${CMD}_status
452
453 MAIL_OUT "-------------------------------------------------------"
454 MAIL_OUT "Make $CMD output: "
455 MAIL_OUT " "
456 tail -${CNT} ${!out_file} >> $MAIL_FILE
457 MAIL_OUT " "
458
459 }
460
461 ##################
462 # function to output report for a step
463 #
464 function REPORT_STEP_ALL ()
465 {
466 CMD=$1
467 out_file=${CMD}_out_file
468 jim.wunderlich 1.1 step_status=${CMD}_status
469
470 MAIL_OUT "-------------------------------------------------------"
471 MAIL_OUT "Make $CMD output: "
472 MAIL_OUT " "
473 cat ${!out_file} >> $MAIL_FILE
474 MAIL_OUT " "
475
476 }
477
478 ###########################################################################
479 ###########################################################################
480 ##
481 ## Configuration is now complete
482 ## Begin execution
483 ##
484
485 if [ ! -e "$PEG_LOC_ROOT" ] ; then
486 mkdir $PEG_LOC_ROOT
487 fi
488
489 jim.wunderlich 1.1
490 TIME_CMD="date -u +%H%M%S"
491
492 platform="$PEGASUS_PLATFORM ($OS_NAME_VER)"
493 branch="MAIN"
494 datestamp=`date -u +%y%m%d`
495 timestamp=`date -u +%H%M`
496 endtimestamp="NOT_DONE"
497 header="UNKNOWN STATUS: $branch: $platform: $datestamp"
498
499 if [ "$cvs_co_status" != "NOT_TO_RUN" ] ; then
500
501 rm -rf $BASE_DIR
502 mkdir $BASE_DIR
503 fi
504
505 cd $BASE_DIR
506
507
508 INIT_STEP_FILE cvs_co
509 INIT_STEP_FILE patch
510 jim.wunderlich 1.1 INIT_STEP_FILE all
511 INIT_STEP_FILE tests
512 INIT_STEP_FILE perftests
513 INIT_STEP_FILE poststarttests
514 INIT_STEP_FILE standardtests
515
516 # create the running status file
517 touch $BASE_DIR/test_running
518
519 # Create new make output file for mail message.
520 MAIL_FILE=$BASE_DIR/mail_file$RUN_NUM
521 echo " " > $MAIL_FILE
522
523 status_file=$BASE_DIR/running_status_file$RUN_NUM
524 echo " " > $status_file
525
526 STATUS_OUT "Starting nightly test"
527 STATUS_OUT "platform=$platform"
528 STATUS_OUT "Date: $datestamp "
529 STATUS_OUT "Time: $timestamp GMT"
530 STATUS_OUT "Current User=`whoami`"
531 jim.wunderlich 1.1 STATUS_OUT "BASE_DIR=$BASE_DIR"
532 STATUS_OUT "CVSROOT=$CVSROOT"
533 STATUS_OUT "PEGASUS_HOME=$PEGASUS_HOME"
534 STATUS_OUT "PEGASUS_ROOT=$PEGASUS_ROOT"
535 STATUS_OUT "PEGASUS_PLATFORM=$PEGASUS_PLATFORM"
536 STATUS_OUT " "
537 STATUS_OUT "cvs_co_file=$cvs_co_out_file"
538 STATUS_OUT "patch_file=$patch_out_file"
539 STATUS_OUT "make_file=$all_out_file"
540 STATUS_OUT "tests_file=$tests_out_file"
541 STATUS_OUT "perftests_file=$perftests_out_file"
542 STATUS_OUT "poststarttests_file=$poststarttests_out_file"
543 STATUS_OUT "standardtests_file=$standardtests_out_file"
544
545
546 STATUS_OUT " "
547 STATUS_OUT "cvs_co_status=$cvs_co_status"
548 STATUS_OUT "patch_status=$patch_status"
549 STATUS_OUT "all_status=$all_status"
550 STATUS_OUT "tests_status=$tests_status"
551 STATUS_OUT "poststarttests_status=$poststarttests_status"
552 jim.wunderlich 1.1 STATUS_OUT "standardtests_status=$standardtests_status"
553 STATUS_OUT "perftests_status=$perftests_status"
554
555 # checkout a new tree
556 if [ "$cvs_co_status" != "NOT_TO_RUN" ] ; then
557
|
558 jim.wunderlich 1.9 STATUS_OUT "checkout of $MOD_NAME module revision $MOD_REV started at `$TIME_CMD` "
|
559 jim.wunderlich 1.1
|
560 jim.wunderlich 1.9 cvs -z6 co -d $MOD_DIR_NAME -r $MOD_REV $MOD_NAME 1>$cvs_co_out_file 2>&1
|
561 jim.wunderlich 1.1 fi
562
563 if [ -d pegasus ] ; then
564 cvs_co_status="SUCCESS"
565 cd pegasus/src/utils
566 make 1>>$cvs_co_out_file 2>&1
567 cd mu
568 make 1>>$cvs_co_out_file 2>&1
569 cd $BASE_DIR
570 else
571 cvs_co_status="FAILURE"
572 fi
573
574 STATUS_OUT "checkout of file $cvs_co_status at `$TIME_CMD` "
575
576 cd pegasus
577
578 if [ "$patch_status" != "NOT_TO_RUN" ] ; then
579 if [ -e $PATCH_FILE ] ; then
580 STATUS_OUT "SW changes needed, applying $PATCH_FILE patches"
581 patch -p0 -b -r $PATCH_ERRORS < $PATCH_FILE 1>$patch_out_file 2>&1
582 jim.wunderlich 1.1
583 if [ -e $PATCH_ERRORS ] ; then
584 STATUS_OUT echo "ERROR applying patch $PATCH_FILE: see $PATCH_ERRORS file "
585 exit
586 fi
587 else
588 STATUS_OUT "SW changes not needed, no file $PATCH_FILE"
589
590 fi
591 fi
592
593 if [ "$cvs_co_status" == "SUCCESS" ] ; then
594
595 EXEC_MAKE_STEP all
596
597 fi
598
599 if [ "$cvs_co_status" == "SUCCESS" ] \
600 || [ "$cvs_co_status" == "NOT_TO_RUN" ] \
601 && [ "$all_status" == "SUCCESS" ] \
602 || [ "$all_status" == "NOT_TO_RUN" ]
603 jim.wunderlich 1.1 then
604 EXEC_MAKE_STEP tests
605
606 ##
607 ## The setupdevserver rule is available in 2.5.1 but not in 2.5
608 ##
609
610 make setupdevserver 1>>../all_out 2>&1
611
612 ##
613 ## use the following on 2.5. They will also work on 2.5.1
614 ## On 2.5 you have to build the repository or run the prestarttests rule
615 ## rather than then tests rule above. The prestarttests rule built the
616 ## repositories and then ran the unit functional tests.
617 ##
618 ##
619 ## make --directory=./src/Server -f Makefile install_run 1>>$poststarttests_out_file 2>&1
620 ## make --directory=./src/Clients/ssltrustmgr/tests -f Makefile test_setup 1>>$poststarttests_out_file 2>&1
621 ##
622 ##
623
624 jim.wunderlich 1.1 EXEC_TESTMAKE_STEP perftests
625 EXEC_TESTMAKE_STEP poststarttests
626 EXEC_TESTMAKE_STEP standardtests
627 fi
628
629 # Build the test report for mailing
630
631 endtimestamp=`date -u +%H%M` ## get the completion time
632
633 # Determine the overall status of the tests
634
635 if [ "$cvs_co_status" == "SUCCESS" ] \
636 || [ "$cvs_co_status" == "NOT_TO_RUN" ] \
637 && [ "$all_status" == "SUCCESS" ] \
638 || [ "$all_status" == "NOT_TO_RUN" ] \
639 && [ "$tests_status" == "SUCCESS" ] \
640 || [ "$tests_status" == "NOT_TO_RUN" ] \
641 && [ "$perftests_status" == "SUCCESS" ] \
642 || [ "$perftests_status" == "NOT_TO_RUN" ] \
643 && [ "$poststarttests_status" == "SUCCESS" ] \
644 || [ "$poststarttests_status" == "NOT_TO_RUN" ] \
645 jim.wunderlich 1.1 && [ "$standardtests_status" == "SUCCESS" ] \
646 || [ "$standardtests_status" == "NOT_TO_RUN" ]
647 then
648 status="SUCCESS"
649 else
650 status="FAILURE"
651 fi
652
653 header="$status: $branch: $platform: $datestamp"
654
655 MAIL_OUT "Platform: $platform"
656 MAIL_OUT "Branch: $branch"
657 MAIL_OUT "Date: $datestamp"
658 MAIL_OUT "Time: $timestamp GMT"
659 MAIL_OUT "Status: $status "
660 MAIL_OUT "End Time: $endtimestamp GMT"
661 MAIL_OUT " "
662 MAIL_OUT "-------------------------------------------------------"
663 MAIL_OUT "Mail_To: $MAIL_TO"
664 MAIL_OUT "The_Subject: $header"
665 MAIL_OUT "-------------------------------------------------------"
666 jim.wunderlich 1.1 MAIL_OUT " "
667 MAIL_OUT "SW changes:"
668 if [ -e $PATCH_FILE ] ; then
669 MAIL_OUT "Yes SW changes used, and attached below"
670 else
671 MAIL_OUT "No SW changes needed"
672 fi
673
674 MAIL_OUT " "
675 MAIL_OUT "The Time Format is HHMMSS GMT time"
676 MAIL_OUT " "
677 REPORT_STEP_STATUS all
678 REPORT_STEP_STATUS tests
679 REPORT_STEP_STATUS perftests
680 REPORT_STEP_STATUS poststarttests
681 REPORT_STEP_STATUS standardtests
682
|
683 jim.wunderlich 1.5 MAIL_OUT "------------------------------"
684 MAIL_OUT "Peg_nightly script cvs version:"
685 MAIL_OUT " "
686 MAIL_OUT "Peg_nightly version is $PEG_NIGHTLY_REV"
687 MAIL_OUT " "
|
688 jim.wunderlich 1.1 MAIL_OUT "-------------------------------------------------------"
689 MAIL_OUT "Pegasus Environment Variables:"
690 printenv | grep PEGASUS >> $MAIL_FILE
691 printenv | grep OPENSSL >> $MAIL_FILE
692 MAIL_OUT " "
693 MAIL_OUT " "
694 MAIL_OUT "-------------------------------------------------------"
695 MAIL_OUT "Additional Configuration Information:"
696 MAIL_OUT " "
697 MAIL_OUT "Current User: `whoami`"
698 MAIL_OUT "CPU Type: $CPU_TYPE"
699 MAIL_OUT "CPU Freq: $CPU_FREQ"
700 MAIL_OUT "CPU Count: $CPU_CNT"
701 MAIL_OUT " "
702 MAIL_OUT "------------------------------"
703 MAIL_OUT "Make version (make -v output):"
704 MAIL_OUT " "
705 make -v >> $MAIL_FILE 2>&1
706 MAIL_OUT " "
707 MAIL_OUT "------------------------------"
708 MAIL_OUT "Compiler version (c++ -v output):"
709 jim.wunderlich 1.1 MAIL_OUT " "
710 c++ -v >> $MAIL_FILE 2>&1
711 MAIL_OUT " "
712 MAIL_OUT "------------------------------"
713 MAIL_OUT "SSL version ( openssl version output):"
714 MAIL_OUT " "
715 openssl version >> $MAIL_FILE 2>&1
716 MAIL_OUT " "
717 MAIL_OUT "------------------------------"
718 MAIL_OUT "uname -a output:"
719 MAIL_OUT " "
720 uname -a >> $MAIL_FILE 2>&1
721 MAIL_OUT " "
722 MAIL_OUT "------------------------------"
723 MAIL_OUT "OS Details (cimserver startup & osinfo output):"
724 MAIL_OUT " "
725 cimserver >> $MAIL_FILE 2>&1
726 MAIL_OUT " "
727 osinfo >> $MAIL_FILE 2>&1
728 MAIL_OUT " "
729 MAIL_OUT "------------------------------"
730 jim.wunderlich 1.1 MAIL_OUT "ending cimserver configuration (cimconfig -lc output):"
731 MAIL_OUT " "
732 cimconfig -lc >> $MAIL_FILE 2>&1
733 MAIL_OUT " "
734 cimserver -s >> $MAIL_FILE 2>&1
735 MAIL_OUT " "
736
737 ## if [ -e $PATCH_FILE ] ; then
738 MAIL_OUT "-------------------------------------------------------"
739 MAIL_OUT "SW Changes used: "
740 MAIL_OUT " "
741 ## cat $PATCH_FILE >> $MAIL_FILE
742 cvs diff 1>> $MAIL_FILE 2>&1
743 MAIL_OUT " "
744 ## fi
745
746 REPORT_STEP all 30
747 REPORT_STEP tests 30
748 REPORT_STEP perftests 150
749 REPORT_STEP poststarttests 30
750 REPORT_STEP standardtests 30
751 jim.wunderlich 1.1
752 MAIL_OUT "-------------------------------------------------------"
753 MAIL_OUT " "
754
755
756 # Mail the report
757
758 #cat $MAIL_FILE | mail -s "$header" $MAIL_TO
759
760
761 # remove the running status file
762
763 rm $BASE_DIR/test_running
764
765 STATUS_OUT "+++++ nightly test all done ++++++++++++++++++++++++++"
766
|