-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathobtMain.sh
executable file
·1190 lines (861 loc) · 40.8 KB
/
obtMain.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
# For bash debug
PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
#
#------------------------------
#
# Imports (settings, functions)
#
#. ~/.bash_profile
# To ensure the TIMESTAMP is obtMain execution related.
unset OBT_TIMESTAMP
unset OBT_DATESTAMP
# Git branch settings
. ./settings.sh
# WriteLog() function
. ./timestampLogger.sh
# UninstallHPCC() fuction
. ./UninstallHPCC.sh
# Git branch cloning
. ./cloneRepo.sh
#
#------------------------------
#
# Constants
#
# ------------------------------------------------
# Defined in settings.sh
#
#SHORT_DATE=$(date "+%Y-%m-%d")
#BUILD_DIR=~/build
#RELEASE_BASE=5.0
#STAGING_DIR=/tmount/data2/nightly_builds/HPCC/$RELEASE_BASE
#BUILD_SYSTEM=centos_6_x86_64
#BUILD_TYPE=CE/platform
#TARGET_DIR=${STAGING_DIR}/${SHORT_DATE}/${BUILD_SYSTEM}/${BUILD_TYPE}
#OBT_LOG_DIR=${BUILD_DIR}/bin
#OBT_BIN_DIR=${BUILD_DIR}/bin
# ------------------------------------------------
LONG_DATE=$(date "+%Y-%m-%d_%H-%M-%S")
OBT_LOG_FILE=${BUILD_DIR}/bin/obt-${LONG_DATE}.log
#
#------------------------------
#
# Function
#
ControlC()
# run if user hits control-c or process receives SIGTERM signal
{
WriteLog "User break (Ctrl-c)!" "${OBT_LOG_FILE}"
exitCode=$( echo $? )
ExitEpilog "${OBT_LOG_FILE}" "exitCode"
}
#
#------------------------------
#
# Process parameter
#
#echo "param:'"$1"'"
RUN_REGRESSION=1
RUN_COVERAGE=1
RUN_PERFORMANCE=1
BUILD=1
DRY_RUN=0
if [ "$1." != "." ]
then
param=$1
upperParam=${param^^}
echo "Param: ${upperParam}"
case $upperParam in
REGR*) RUN_REGRESSION=1
RUN_COVERAGE=0
RUN_PERFORMANCE=0
BUILD=1
;;
COVER*) RUN_REGRESSION=0
RUN_COVERAGE=1
RUN_PERFORMANCE=0
BUILD=0
;;
PERF*) RUN_REGRESSION=0
RUN_COVERAGE=0
RUN_PERFORMANCE=1
BUILD=0
;;
ML*)
RUN_REGRESSION=0
RUN_COVERAGE=0
RUN_PERFORMANCE=0
RUN_ML_TESTS=1
;;
BUI*) # Only build
RUN_REGRESSION=0
RUN_COVERAGE=0
RUN_PERFORMANCE=0
;;
*) # Dry run
DRY_RUN=1
RUN_REGRESSION=0
RUN_COVERAGE=0
RUN_PERFORMANCE=0
BUILD=0
;;
esac
fi
#
#------------------------------
#
# there is a bug in GCC 4.8.2 and crash in coverage build
IS_GCC_4_8_2=$( gcc -v 2>&1 | grep '[v]ersion 4.8.2' )
#echo "IS_GCC_4_8_2: ${IS_GCC_4_8_2}, RUN_COVERAGE:${RUN_COVERAGE}"
if [[ ( -n "$IS_GCC_4_8_2" ) && ( ${RUN_COVERAGE} -eq 1 ) ]]
then
RUN_COVERAGE=0
fi
#
#----------------------------------------------------
#
# Start Overnight Build and Test process
#
WriteLog "OBT started ($0)" "${OBT_LOG_FILE}"
WriteLog "I am $( whoami)" "${OBT_LOG_FILE}"
WriteLog "Trap SIGINT, SIGTERM and SIGKILL signals" "${OBT_LOG_FILE}"
# trap keyboard interrupt (control-c) and SIGTERM signals
trap ControlC SIGINT
trap ControlC SIGTERM
trap ControlC SIGKILL
export PATH=$PATH:/usr/local/bin:/bin:/usr/local/sbin:/sbin:/usr/sbin:/mnt/disk1/home/vamosax/bin:
WriteLog "path:'${PATH}'" "${OBT_LOG_FILE}"
WriteLog "LD_LIBRARY_PATH:'${LD_LIBRARY_PATH}'" "${OBT_LOG_FILE}"
WriteLog "GCC: $(gcc --version | head -n 1)" "${OBT_LOG_FILE}"
WriteLog "CMake: $( /usr/local/bin/cmake --version | head -n 1)" "${OBT_LOG_FILE}"
WriteLog "Python: $(python --version )" "${OBT_LOG_FILE}"
WriteLog "Python3: $(python3 --version )" "${OBT_LOG_FILE}"
STARTUP_MSG=""
if [[ "$BUILD" -eq 1 ]]
then
STARTUP_MSG=${STARTUP_MSG}"build ($BUILD_TYPE)"
fi
if [[ "$RUN_REGRESSION" -eq 1 ]]
then
STARTUP_MSG=${STARTUP_MSG}", Regression"
fi
if [[ "$RUN_COVERAGE" -eq 1 ]]
then
STARTUP_MSG=${STARTUP_MSG}", Coverage"
fi
if [[ "$RUN_PERFORMANCE" -eq 1 ]]
then
STARTUP_MSG=${STARTUP_MSG}", Performance"
fi
if [[ -n "$STARTUP_MSG" ]]
then
WriteLog "In this run of OBT we execute $STARTUP_MSG." "${OBT_LOG_FILE}"
else
WriteLog "No target selected, this is a dry run." "${OBT_LOG_FILE}"
#./archiveLogs.sh obt-cleanup timestamp=${OBT_TIMESTAMP}
#exit -1
fi
WriteLog "pwd:$(pwd)" "${OBT_LOG_FILE}"
#
#---------------------------------------------------
#
# Increase number of user process
#
WriteLog "Increase stack size to ${OBT_SYSTEM_STACKSIZE}." "${OBT_LOG_FILE}"
ulimit -s ${OBT_SYSTEM_STACKSIZE}
WriteLog "Increase number of user process to ${OBT_SYSTEM_NUMBER_OF_PROCESS}." "${OBT_LOG_FILE}"
ulimit -u ${OBT_SYSTEM_NUMBER_OF_PROCESS}
WriteLog "Increase number of open files to ${OBT_SYSTEM_NUMBER_OF_FILES}." "${OBT_LOG_FILE}"
ulimit -n ${OBT_SYSTEM_NUMBER_OF_FILES}
#res=$( ulimit -a | egrep '[pr]ocesses|open|stack' )
res=$( ulimit -a )
WriteLog "Limits:\n${res}" "${OBT_LOG_FILE}"
#
#----------------------------------------------------
#
# Enable core generation
#
WriteLog "Enable core generation." "${OBT_LOG_FILE}"
#ulimit -c unlimited
[[ -z $OBT_SYSTEM_CORE_SIZE ]] && OBT_SYSTEM_CORE_SIZE=unlimited
WriteLog "Set the core file size to $OBT_SYSTEM_CORE_SIZE." "${OBT_LOG_FILE}"
ulimit -c $OBT_SYSTEM_CORE_SIZE
res=$( ulimit -a | grep '[c]ore' )
WriteLog "ulimit: ${res}" "${OBT_LOG_FILE}"
./checkCoreGen.sh >> ${OBT_LOG_FILE} 2>&1
#
#----------------------------------------------------
#
# Start disk/mem space checker
#
if [[ ${DISK_SPACE_MONITOR_START} -eq 1 ]]
then
KillCheckDiskSpace "${OBT_LOG_FILE}"
WriteLog "Start disk space checker" "${OBT_LOG_FILE}"
./checkDiskSpace.sh &
echo $! > checkdiskspace.pid
fi
if [[ ${MY_INFO_MONITOR_START} -eq 1 ]]
then
WriteLog "Start myInfo" "${OBT_LOG_FILE}"
./myInfo.sh &
echo $! > myinfo.pid
fi
if [[ ${PORT_MONITOR_START} -eq 1 ]]
then
WriteLog "Start port monitor" "${OBT_LOG_FILE}"
(fn="myPortUsage-"$( date "+%Y-%m-%d_%H-%M-%S" )".log"; while true; do echo $( date "+%Y.%m.%d %H:%M:%S" ) >> ${fn}; sudo netstat -anp >> ${fn}; echo -e "---------------------------------\n" >> ${fn}; sleep 1; done ) &
#(fn="myPortUsage-"$( date "+%Y-%m-%d_%H-%M-%S" )".log"; while true; do echo $( date "+%y.%m.%d %H:%M:%S" ) >> ${fn}; sudo ss -antp4 >> ${fn}; echo -e "------------------------------------------\n" >> ${fn}; sleep 1; done ) &
echo $! > portlog.pid
fi
if [[ ${HTHOR_STACK_MONITOR_START} -eq 1 ]]
then
WriteLog "Hthor start stack monitor" "${OBT_LOG_FILE}"
(fn="HthorStackUsage-"$( date "+%Y-%m-%d_%H-%M-%S" )".log"; while true; do echo $( date "+%Y.%m.%d %H:%M:%S" ) >> ${fn}; sudo netstat -anp >> ${fn}; echo -e "---------------------------------\n" >> ${fn}; sleep 1; done ) &
#(fn="myPortUsage-"$( date "+%Y-%m-%d_%H-%M-%S" )".log"; while true; do echo $( date "+%y.%m.%d %H:%M:%S" ) >>$
echo $! > hthorStackMonitorLog.pid
fi
#
#----------------------------------------------------
#
# Un-install HPCC Systems
#
WriteLog "Un-install HPCC Systems" "${OBT_LOG_FILE}"
#cd $TEST_ROOT
if [[ "$RUN_REGRESSION" -eq 1 ]]
then
UninstallHPCC "${OBT_LOG_FILE}" "${REGRESSION_WIPE_OFF_HPCC}"
fi
if [[ "$RUN_PERFORMANCE" -eq 1 ]]
then
UninstallHPCC "${OBT_LOG_FILE}" "${PERF_WIPE_OFF_HPCC}"
fi
# Possible strategy to restart this process is:
# 1. Add schedule into crontab 10-15 minutes later today
# 2. restart the OBT machine
# 3. remove unecessary schedule from crontab (make backup in 1 and restore here)
#
#----------------------------------------------------
#
# Record current diskspace
#
diskSpace=$( df -h . | egrep '^(/dev/)' | awk '{print $1": "$4}' )
WriteLog "Disk space is:${diskSpace}" "${OBT_LOG_FILE}"
#
#----------------------------------------------------
#
# Kill Cassandra if it used too much memory
#
WriteLog "Check memory." "${OBT_LOG_FILE}"
WriteLog "Free memory is: $( GetFreeMemGB )" "${OBT_LOG_FILE}"
freeMem=$( GetFreeMem )
# Limit in kByte
MEMORY_LIMIT_GB=3
MEMORY_LIMIT=$(( $MEMORY_LIMIT_GB * (2 ** 20) ))
if [[ $freeMem -lt ${MEMORY_LIMIT} ]]
then
cassandraPID=$( ps ax | grep '[c]assandra' | awk '{print $1}' )
if [[ -n "$cassandraPID" ]]
then
WriteLog "Free memory too low, kill Cassandra (pid: ${cassandraPID})" "${OBT_LOG_FILE}"
sudo kill -9 ${cassandraPID}
sleep 20
freeMem=$( GetFreeMem )
if [[ $freeMem -lt ${MEMORY_LIMIT} ]]
then
WriteLog "The free memory $( GetFreeMemGB ) is too low!" "${OBT_LOG_FILE}"
# send email to Agyi
#echo "After the kill Cassandra the OBT Free memory $( GetFreeMemGB ) is still too low!" | mailx -s "OBT Memory problem" -u $USER ${ADMIN_EMAIL_ADDRESS}
#ExitEpilog
else
WriteLog "The free memory is $( GetFreeMemGB )." "${OBT_LOG_FILE}"
fi
else
WriteLog "Cassandra doesn't run but the free memory ($( GetFreeMemGB )) is too low!" "${OBT_LOG_FILE}"
WriteLog "Try to kill Kafka and zookeeper" "${OBT_LOG_FILE}"
killKafka=$( ps ax | grep '[K]afka' | awk '{print $1 }' | while read pid; do echo "kill $pid"; sudo kill -9 $pid; done; )
WriteLog "${killKafka}" "${OBT_LOG_FILE}"
sleep 20
killZookeeper=$( ps ax | grep '[z]ook' | awk '{print $1 }' | while read pid; do echo "kill $pid"; sudo kill -9 $pid; done; )
WriteLog "${killZookeeper}" "${OBT_LOG_FILE}"
sleep 20
rm -fr /tmp/zookeeper /tmp/kafka-log
WriteLog "The free memory is $( GetFreeMemGB )!" "${OBT_LOG_FILE}"
fi
clearOsCache=$( free; sudo sync; echo 3 | sudo tee /proc/sys/vm/drop_caches; free )
WriteLog "Clear Os cache result:\n${clearOsCache}" "${OBT_LOG_FILE}"
WriteLog "The free memory is $( GetFreeMemGB )!" "${OBT_LOG_FILE}"
fi
cassandraPID=$( ps ax | grep '[c]assandra' | awk '{print $1}' )
if [[ -n "$cassandraPID" ]]
then
WriteLog "Try to kill Cassandra (pid: ${cassandraPID})" "${OBT_LOG_FILE}"
sudo kill -9 ${cassandraPID}
sleep 20
WriteLog "The free memory is $( GetFreeMemGB )!" "${OBT_LOG_FILE}"
fi
WriteLog "Try to kill Kafka and zookeeper" "${OBT_LOG_FILE}"
killKafka=$( ps ax | grep '[K]afka' | awk '{print $1 }' | while read pid; do echo "kill Kafka (pid:$pid)"; sudo kill -9 $pid; done; )
WriteLog "Kafka result:${killKafka}" "${OBT_LOG_FILE}"
sleep 20
killZookeeper=$( ps ax | grep '[z]ook' | awk '{print $1 }' | while read pid; do echo "kill Zookeeper (pid:$pid)"; sudo kill -9 $pid; done; )
WriteLog "Zookeeper result:${killZookeeper}" "${OBT_LOG_FILE}"
sleep 20
KillJava "${OBT_LOG_FILE}"
WriteLog "Check Couchbase state" "${OBT_LOG_FILE}"
if [ -f /opt/couchbase/bin/couchbase-server ]
then
# It is not as resurce hungry beast as Cassandra and Kafka, so leave it alone
#WriteLog "Try to kill Couchbase" "${OBT_LOG_FILE}"
#killCouchbase=$( sudo /opt/couchbase/bin/couchbase-server -k )
#WriteLog "Couchbase result:${killCouchbase}" "${OBT_LOG_FILE}"
couchbaseState=$( ps aux | egrep -ic 'couchbase-server' )
if [[ ${couchbaseState} -ne 0 ]]
then
WriteLog "Couchbase is up." "${OBT_LOG_FILE}"
else
WriteLog "Couchbase is down." "${OBT_LOG_FILE}"
fi
else
WriteLog "It is not exist, skip it." "${OBT_LOG_FILE}"
fi
#
#----------------------------------------------------
#
# Update BuildNotification.ini and ReportPerfTestResult.ini to use proper branch, build system id ans for old OBT IP of mounted log server
#
pushd ${OBT_BIN_DIR} > /dev/null
WriteLog "pwd:$(pwd)" "${OBT_LOG_FILE}"
WriteLog "Update 'BuildBranch' in BuildNotification.ini" "${OBT_LOG_FILE}"
cp -f ./BuildNotification.ini ./BuildNotification.bak
sed -e '/# Gen\(.*\)/d' -e '/# Upd\(.*\)/d' -e '/^BuildBranch : \(.*\)/c # Updated by OBT @ '"$( date '+%Y-%m-%d %H:%M:%S' )"' \nBuildBranch : '${BRANCH_ID} ./BuildNotification.ini > ./BuildNotification.tmp && mv -f ./BuildNotification.tmp ./BuildNotification.ini
# Get build branch
WriteLog "Build branch is: '${BRANCH_ID}'" "${OBT_LOG_FILE}"
WriteLog "Update 'BuildBranch' in ReportPerfTestResult.ini" "${OBT_LOG_FILE}"
cp -f ./ReportPerfTestResult.ini ./ReportPerfTestResult.bak
sed -e '/# Gen\(.*\)/d' -e '/# Upd\(.*\)/d' -e '/^BuildBranch : \(.*\)/c # Updated by OBT @ '"$( date '+%Y-%m-%d %H:%M:%S' )"' \nBuildBranch : '${BRANCH_ID} ./ReportPerfTestResult.ini > ./ReportPerfTestResult.tmp && mv -f ./ReportPerfTestResult.tmp ./ReportPerfTestResult.ini
# Get system info
WriteLog "System ID is: '${SYSTEM_ID}'" "${OBT_LOG_FILE}"
WriteLog "Update 'BuildSystem' in BuildNotification.ini" "${OBT_LOG_FILE}"
cp -f ./BuildNotification.ini ./BuildNotification.bak
sed 's/^BuildSystem\(.*\)/BuildSystem : '"${SYSTEM_ID}"'/g' ./BuildNotification.ini > ./BuildNotification.tmp && mv -f ./BuildNotification.tmp ./BuildNotification.ini
WriteLog "Update 'BuildSystem' in ReportPerfTestResult.ini" "${OBT_LOG_FILE}"
cp -f ./ReportPerfTestResult.ini ./ReportPerfTestResult.bak
sed 's/^BuildSystem\(.*\)/BuildSystem : '"${SYSTEM_ID}"'/g' ./ReportPerfTestResult.ini > ./ReportPerfTestResult.tmp && mv -f ./ReportPerfTestResult.tmp ./ReportPerfTestResult.ini
# Get BUILD TYPE info
WriteLog "BuildType is: '${BUILD_TYPE}'" "${OBT_LOG_FILE}"
WriteLog "Update 'BuildType' in BuildNotification.ini" "${OBT_LOG_FILE}"
cp -f ./BuildNotification.ini ./BuildNotification.bak
sed -e '/^BuildType : \(.*\)/c BuildType : '${BUILD_TYPE} ./BuildNotification.ini > ./BuildNotification.tmp && mv -f ./BuildNotification.tmp ./BuildNotification.ini
WriteLog "Update 'BuildType' in ReportPerfTestResult.ini" "${OBT_LOG_FILE}"
cp -f ./ReportPerfTestResult.ini ./ReportPerfTestResult.bak
sed -e '/^BuildType : \(.*\)/c BuildType : '${PERF_BUILD_TYPE} ./ReportPerfTestResult.ini > ./ReportPerfTestResult.tmp && mv -f ./ReportPerfTestResult.tmp ./ReportPerfTestResult.ini
WriteLog "Update 'ThorSlaves' in BuildNotification.ini to ${REGRESSION_NUMBER_OF_THOR_SLAVES}" "${OBT_LOG_FILE}"
cp -f ./BuildNotification.ini ./BuildNotification.bak
sed -e '/^ThorSlaves : \(.*\)/c ThorSlaves : '${REGRESSION_NUMBER_OF_THOR_SLAVES} ./BuildNotification.ini > ./BuildNotification.tmp && mv -f ./BuildNotification.tmp ./BuildNotification.ini
WriteLog "Update 'ThorSlaves' in ReportPerfTestResult.ini to ${PERF_THOR_NUMBER_OF_SLAVES}" "${OBT_LOG_FILE}"
cp -f ./ReportPerfTestResult.ini ./ReportPerfTestResult.bak
sed -e '/^ThorSlaves : \(.*\)/c ThorSlaves : '${PERF_THOR_NUMBER_OF_SLAVES} ./ReportPerfTestResult.ini > ./ReportPerfTestResult.tmp && mv -f ./ReportPerfTestResult.tmp ./ReportPerfTestResult.ini
WriteLog "Update 'ThorChannelsPerSlave ' in BuildNotification.ini to ${REGRESSION_NUMBER_OF_THOR_CHANNELS}" "${OBT_LOG_FILE}"
cp -f ./BuildNotification.ini ./BuildNotification.bak
sed -e '/^ThorChannelsPerSlave : \(.*\)/c ThorChannelsPerSlave : '${REGRESSION_NUMBER_OF_THOR_CHANNELS} ./BuildNotification.ini > ./BuildNotification.tmp && mv -f ./BuildNotification.tmp ./BuildNotification.ini
WriteLog "Update 'ThorChannelsPerSlave ' in ReportPerfTestResult.ini to ${PERF_NUMBER_OF_THOR_CHANNELS}" "${OBT_LOG_FILE}"
cp -f ./ReportPerfTestResult.ini ./ReportPerfTestResult.bak
sed -e '/^ThorChannelsPerSlave : \(.*\)/c ThorChannelsPerSlave : '${PERF_NUMBER_OF_THOR_CHANNELS} ./ReportPerfTestResult.ini > ./ReportPerfTestResult.tmp && mv -f ./ReportPerfTestResult.tmp ./ReportPerfTestResult.ini
WriteLog "Update 'urlBase ' in BuildNotification.ini to ${URL_BASE}" "${OBT_LOG_FILE}"
cp -f ./BuildNotification.ini ./BuildNotification.bak
sed -e '/^urlBase : \(.*\)/c urlBase : '${URL_BASE} ./BuildNotification.ini > ./BuildNotification.tmp && mv -f ./BuildNotification.tmp ./BuildNotification.ini
WriteLog "Update 'shareBase ' in BuildNotification.ini to ${STAGING_DIR_ROOT}" "${OBT_LOG_FILE}"
cp -f ./BuildNotification.ini ./BuildNotification.bak
sed -e '/^shareBase : \(.*\)/c shareBase : '${STAGING_DIR_ROOT} ./BuildNotification.ini > ./BuildNotification.tmp && mv -f ./BuildNotification.tmp ./BuildNotification.ini
WriteLog "Update 'ObtSystem' in BuildNotification.ini to ${OBT_SYSTEM}" "${OBT_LOG_FILE}"
cp -f ./BuildNotification.ini ./BuildNotification.bak
sed -e '/^ObtSystem : \(.*\)/c ObtSystem : '${OBT_SYSTEM} ./BuildNotification.ini > ./BuildNotification.tmp && mv -f ./BuildNotification.tmp ./BuildNotification.ini
WriteLog "Update 'ObtSystem' in ReportPerfTestResult.ini to ${OBT_SYSTEM}" "${OBT_LOG_FILE}"
cp -f ./ReportPerfTestResult.ini ./ReportPerfTestResult.bak
sed -e '/^ObtSystem : \(.*\)/c ObtSystem : '${OBT_SYSTEM} ./ReportPerfTestResult.ini > ./ReportPerfTestResult.tmp && mv -f ./ReportPerfTestResult.tmp ./ReportPerfTestResult.ini
WriteLog "Update 'ObtSystemEnv ' in BuildNotification.ini to ${OBT_SYSTEM_ENV}" "${OBT_LOG_FILE}"
cp -f ./BuildNotification.ini ./BuildNotification.bak
sed -e '/^ObtSystemEnv : \(.*\)/c ObtSystemEnv : '${OBT_SYSTEM_ENV} ./BuildNotification.ini > ./BuildNotification.tmp && mv -f ./BuildNotification.tmp ./BuildNotification.ini
WriteLog "Update 'ObtSystemEnv ' in ReportPerfTestResult.ini to ${OBT_SYSTEM_ENV}" "${OBT_LOG_FILE}"
cp -f ./ReportPerfTestResult.ini ./ReportPerfTestResult.bak
sed -e '/^ObtSystemEnv : \(.*\)/c ObtSystemEnv : '${OBT_SYSTEM_ENV} ./ReportPerfTestResult.ini > ./ReportPerfTestResult.tmp && mv -f ./ReportPerfTestResult.tmp ./ReportPerfTestResult.ini
WriteLog "Update 'ObtSystemHw in BuildNotification.ini to CPU/Cores: ${NUMBER_OF_CPUS}, RAM: ${MEMORY} GB" "${OBT_LOG_FILE}"
cp -f ./BuildNotification.ini ./BuildNotification.bak
sed -e '/^ObtSystemHw : \(.*\)/c ObtSystemHw : "'"CPU/Cores: ${NUMBER_OF_CPUS}, RAM: ${MEMORY} GB"'"' ./BuildNotification.ini > ./BuildNotification.tmp && mv -f ./BuildNotification.tmp ./BuildNotification.ini
WriteLog "Update 'ObtSystemHw' in ReportPerfTestResult.ini to CPU/Cores: ${NUMBER_OF_CPUS}, RAM: ${MEMORY} GB" "${OBT_LOG_FILE}"
cp -f ./ReportPerfTestResult.ini ./ReportPerfTestResult.bak
sed -e '/^ObtSystemHw : \(.*\)/c ObtSystemHw : "'"CPU/Cores: ${NUMBER_OF_CPUS}, RAM: ${MEMORY} GB"'"' ./ReportPerfTestResult.ini > ./ReportPerfTestResult.tmp && mv -f ./ReportPerfTestResult.tmp ./ReportPerfTestResult.ini
WriteLog "Update 'TestMode' in ReportPerfTestResult.ini to TestMode: ${PERF_TEST_MODE}" "${OBT_LOG_FILE}"
cp -f ./ReportPerfTestResult.ini ./ReportPerfTestResult.bak
sed -e '/^TestMode : \(.*\)/c TestMode : '${PERF_TEST_MODE} ./ReportPerfTestResult.ini > ./ReportPerfTestResult.tmp && mv -f ./ReportPerfTestResult.tmp ./ReportPerfTestResult.ini
WriteLog "Update 'ObtLogDir' in ReportPerfTestResult.ini to ObtLogDir : ${OBT_LOG_DIR}" "${OBT_LOG_FILE}"
cp -f ./ReportPerfTestResult.ini ./ReportPerfTestResult.bak
sed -e '/^ObtLogDir : \(.*\)/c ObtLogDir : '${OBT_LOG_DIR} ./ReportPerfTestResult.ini > ./ReportPerfTestResult.tmp && mv -f ./ReportPerfTestResult.tmp ./ReportPerfTestResult.ini
if [ -n "$OBT_ID" ]
then
sender=$REGRESSION_REPORT_SENDER
[[ -z "$sender" ]] && sender="testfarm.${OBT_ID,,}@lexisnexisrisk.com"
WriteLog "Update 'Sender' in BuildNotification.ini to Sender : $sender" "${OBT_LOG_FILE}"
cp -f ./BuildNotification.ini ./BuildNotification.bak
sed -e '/^Sender : \(.*\)/c Sender : '"$sender" ./BuildNotification.ini > ./BuildNotification.tmp && mv -f ./BuildNotification.tmp ./BuildNotification.ini
WriteLog "Update 'Sender' in ReportPerfTestResult.ini to Sender : $sender" "${OBT_LOG_FILE}"
cp -f ./ReportPerfTestResult.ini ./ReportPerfTestResult.bak
sed -e '/^Sender : \(.*\)/c Sender : '"$sender" ./ReportPerfTestResult.ini > ./ReportPerfTestResult.tmp && mv -f ./ReportPerfTestResult.tmp ./ReportPerfTestResult.ini
fi
if [[ -n "$REGRESSION_REPORT_RECEIVERS" ]]
then
WriteLog "Update 'Receivers' in BuildNotification.ini to Receivers : ${REGRESSION_REPORT_RECEIVERS}" "${OBT_LOG_FILE}"
cp -f ./BuildNotification.ini ./BuildNotification.bak
sed -e '/^Receivers : \(.*\)/c Receivers : '"${REGRESSION_REPORT_RECEIVERS}" ./BuildNotification.ini > ./BuildNotification.tmp && mv -f ./BuildNotification.tmp ./BuildNotification.ini
else
WriteLog "The 'REGRESSION_REPORT_RECEIVERS' not defined in settings.sh keep the original value" "${OBT_LOG_FILE}"
fi
if [[ -n "$REGRESSION_REPORT_RECEIVERS_WHEN_NEW_COMMIT" ]]
then
WriteLog "Update 'ReceiversWhenNewCommit' in BuildNotification.ini to ReceiversWhenNewCommit : ${REGRESSION_REPORT_RECEIVERS_WHEN_NEW_COMMIT}" "${OBT_LOG_FILE}"
cp -f ./BuildNotification.ini ./BuildNotification.bak
sed -e '/^ReceiversWhenNewCommit : \(.*\)/c ReceiversWhenNewCommit : '"${REGRESSION_REPORT_RECEIVERS_WHEN_NEW_COMMIT}" ./BuildNotification.ini > ./BuildNotification.tmp && mv -f ./BuildNotification.tmp ./BuildNotification.ini
else
WriteLog "The 'REGRESSION_REPORT_RECEIVERS_WHEN_NEW_COMMIT' not defined in settings.sh keep the original value" "${OBT_LOG_FILE}"
fi
# Check if it is an old OBT system with 'urlBase : http://<IP>/data2/...'
isOldOBT=$( cat BuildNotification.ini | grep -c -i 'data2' )
if [[ $isOldOBT -ne 0 ]]
then
# Get Log Server ip from mount
# (The logserver directory mounted as a share, it can read from the output of mount)
logServerIP=$( mount | grep -i 'data2' | cut -d: -f1 )
WriteLog "Log server IP ($logServerIP) " "${OBT_LOG_FILE}"
WriteLog "Update log server IP of 'urlBase' in BuildNotification.ini" "${OBT_LOG_FILE}"
sed -e '/^urlBase : \(.*\)/c # Updated by OBT @ '"$( date '+%Y-%m-%d %H:%M:%S' )"' \nurlBase : http:\/\/'"${logServerIP}"'\/data2\/nightly_builds\/HPCC' ./BuildNotification.ini > ./BuildNotification.tmp && mv -f ./BuildNotification.tmp ./BuildNotification.ini
WriteLog "Update log server IP of 'urlBase' in ReportPerfTestResult.ini" "${OBT_LOG_FILE}"
sed -e '/^urlBase : \(.*\)/c # Updated by OBT @ '"$( date '+%Y-%m-%d %H:%M:%S' )"' \nurlBase : http:\/\/'"${logServerIP}"'\/data2\/nightly_builds\/HPCC' ./ReportPerfTestResult.ini > ./ReportPerfTestResult.tmp && mv -f ./ReportPerfTestResult.tmp ./ReportPerfTestResult.ini
fi
WriteLog "Update success !" "${OBT_LOG_FILE}"
popd > /dev/null
#
#--------------------------------------------------
#
# Build it
#
if [[ $BUILD -eq 1 ]]
then
#
#----------------------------------------------------
#
# Build phase
#
./build.sh
if [[ 0 -ne $? ]]
then
ExitEpilog "${OBT_LOG_FILE}" "-1"
fi
KillJava "${OBT_LOG_FILE}"
#if [ $RUN_UNITTESTS -ne 1 ]
#then
# Unit tests doesn't run, so archive build logs now
cd ${OBT_BIN_DIR}
./archiveLogs.sh obt-build timestamp=${OBT_TIMESTAMP}
#fi
else
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "****************************" "${OBT_LOG_FILE}"
WriteLog " Skip build HPCC Platform..." "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
fi
#
#--------------------------------------------------
#
# Run coverity
#
if [ $RUN_COVERITY -eq 1 ]
then
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "***********************" "${OBT_LOG_FILE}"
WriteLog " Run coverity " "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
res=$( ./runCoverity.sh 2>&1 )
WriteLog "Result is: ${res}" "${OBT_LOG_FILE}"
else
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "***********************" "${OBT_LOG_FILE}"
WriteLog " Skip Coverity... " "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
fi
#
#--------------------------------------------------
#
# Unit and wutool tests
#
if [ $RUN_UNITTESTS -eq 1 ]
then
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "***********************" "${OBT_LOG_FILE}"
WriteLog " Execute Unit tests " "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
res=$( ${SUDO} ${PKG_INST_CMD} ${BUILD_HOME}/hpccsystems-platform?community*.rpm 2>&1 )
echo "${res}" > install.log
WriteLog "Install result is:\n${res}" "${OBT_LOG_FILE}"
cd ${OBT_BIN_DIR}
WriteLog "Unittests param: '${UNITTESTS_PARAM}'" "${OBT_LOG_FILE}"
./unittest.sh ${UNITTESTS_PARAM}
if [ ! -e ${TARGET_DIR}/test ]
then
WriteLog "Create ${TARGET_DIR}/test directory..." "${OBT_LOG_FILE}"
mkdir -p ${TARGET_DIR}/test
fi
WriteLog "Copy unittest result files to ${TARGET_DIR}..." "${OBT_LOG_FILE}"
cp ${OBT_LOG_DIR}/unittest*.log ${TARGET_DIR}/test/
# To prevent any non ASCII character can cause problem with BuildNotification.py
#cp ${OBT_LOG_DIR}/unittests.summary ${TARGET_DIR}/test/
iconv -f utf-8 -t ascii -c -o ${TARGET_DIR}/test/unittests.summary ${OBT_LOG_DIR}/unittests.summary
# Archive build an unit tests logs
cd ${OBT_BIN_DIR}
./archiveLogs.sh intern-unitt timestamp=${OBT_TIMESTAMP}
WriteLog "Unit tests done" "${OBT_LOG_FILE}"
else
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "****************************" "${OBT_LOG_FILE}"
WriteLog " Skip Unit tests... " "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
fi
if [ $RUN_WUTOOL_TESTS -eq 1 ]
then
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "***********************" "${OBT_LOG_FILE}"
WriteLog " Execute WUtool tests " "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
# Check if the HPCC System installed
if [[ ! -f /etc/init.d/hpcc-init ]]
then
WriteLog "Install HPCC Systems" "${OBT_LOG_FILE}"
${SUDO} ${PKG_INST_CMD} ${BUILD_HOME}/hpccsystems-platform?community*.rpm > install.log 2>&1
fi
cd ${OBT_BIN_DIR}
./wutoolTest.sh
if [ ! -e ${TARGET_DIR}/test ]
then
WriteLog "Create ${TARGET_DIR}/test directory..." "${OBT_LOG_FILE}"
mkdir -p ${TARGET_DIR}/test
fi
WriteLog "Copy wutool result files to ${TARGET_DIR}..." "${OBT_LOG_FILE}"
cp ${OBT_LOG_DIR}/wutoolTests.log ${TARGET_DIR}/test/wutooltests.log
cp ${OBT_LOG_DIR}/wutoolTest*.summary ${TARGET_DIR}/test/wutooltests.summary
# Archive build an unit tests logs
cd ${OBT_BIN_DIR}
./archiveLogs.sh intern-wutool timestamp=${OBT_TIMESTAMP}
WriteLog "WUtool tests done" "${OBT_LOG_FILE}"
else
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "****************************" "${OBT_LOG_FILE}"
WriteLog " Skip WUtool tests... " "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
fi
if [ $RUN_ML_TESTS -eq 1 ]
then
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "***********************" "${OBT_LOG_FILE}"
WriteLog " Execute ML tests " "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
# Check if the HPCC System installed
if [[ ! -f /etc/init.d/hpcc-init ]]
then
WriteLog "Install HPCC Systems" "${OBT_LOG_FILE}"
${SUDO} ${PKG_INST_CMD} ${BUILD_HOME}/hpccsystems-platform?community*.rpm > install.log 2>&1
fi
cd ${OBT_BIN_DIR}
#./mltest.sh
./bundleTest.sh
cd ${OBT_BIN_DIR}
# if [ ! -e ${TARGET_DIR}/test/ML ]
# then
# WriteLog "Create ${TARGET_DIR}/test/ML directory..." "${OBT_LOG_FILE}"
# mkdir -p ${TARGET_DIR}/test/ML
# fi
# # Copy test summary to Wiki
# WriteLog "Copy ML test result files from ${LOG_DIR} to ${TARGET_DIR}..." "${OBT_LOG_FILE}"
#
# WriteLog "--->${LOG_DIR}/ml-....log" "${OBT_LOG_FILE}"
# WriteLog "--->$(ls -l ${LOG_DIR}/ )" "${OBT_LOG_FILE}"
# res=$( cp -v ${LOG_DIR}/ml-*.log ${TARGET_DIR}/test/ 2>&1 )
# WriteLog "---->res:${res}" "${OBT_LOG_FILE}"
#
# WriteLog "--_>mltests.summary" "${OBT_LOG_FILE}"
# res=$( cp -v mltests.summary ${TARGET_DIR}/test/mltests.summary 2>&1 )
# WriteLog "---->res:${res}" "${OBT_LOG_FILE}"
#
# To-DO Should check it there is any ZAP file
#WriteLog " ZAP file(s)" "${OBT_LOG_FILE}"
#cp ${ZAP_DIR}/* ${TARGET_DIR}/test/ZAP/
# Archive logs
WriteLog "Archive ${TARGET_PLATFORM} ML logs" "${OBT_LOG_FILE}"
./archiveLogs.sh ml-${TARGET_PLATFORM} timestamp=${OBT_TIMESTAMP}
WriteLog "ML tests done" "${OBT_LOG_FILE}"
else
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "****************************" "${OBT_LOG_FILE}"
WriteLog " Skip ML tests... " "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
fi
if [ $RUN_REGRESSION -eq 1 ]
then
#
#--------------------------------------------------
#
# Regression test
#
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "***********************" "${OBT_LOG_FILE}"
WriteLog "Execute Regression test" "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
cd ${OBT_BIN_DIR}
./regress.sh
# Remove old builds
#${BUILD_DIR}/bin/clean_builds.sh
WriteLog "Regression test done" "${OBT_LOG_FILE}"
if [ $RUN_WUTEST -eq 0 ]
then
# -----------------------------------------------------
#
# Uninstall HPCC
#
WriteLog "Uninstall HPCC-Platform" "${OBT_LOG_FILE}"
[ -d ${BUILD_DIR}/${BUILD_TYPE}/build ] && cd ${BUILD_DIR}/${BUILD_TYPE}/build
UninstallHPCC "${OBT_LOG_FILE}" "${REGRESSION_WIPE_OFF_HPCC}"
WriteLog "Copy regression uninstall logs" "${OBT_LOG_FILE}"
[ ! -d ${TARGET_DIR}/test ] && mkdir -p ${TARGET_DIR}/test
[ -f uninstall.log ] && cp uninstall.log ${TARGET_DIR}/test/
[ -f uninstall.summary ] && cp uninstall.summary ${TARGET_DIR}/test/
fi
redisMonitors=$( pgrep redis-cli )
if [ -n "$redisMonitors" ]
then
WriteLog "Redis monitor pids: ${redisMonitors}" "${OBT_LOG_FILE}"
redisMonitorsKill=$( pkill redis-cli 2>&1 )
WriteLog "Kill Redis monitor result: '${redisMonitorsKill}'" "${OBT_LOG_FILE}"
fi
else
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "***********************" "${OBT_LOG_FILE}"
WriteLog " Skip Regression test " "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
fi
if [ $RUN_WUTEST -eq 1 ]
then
#-----------------------------------------------------------------------------
#
# wutest
#
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "***********************" "${OBT_LOG_FILE}"
WriteLog " Execute wutest.py " "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
if [[ -d "${WUTEST_HOME}" && -f "${WUTEST_HOME}/wutest.py" ]]
then
cd ${WUTEST_HOME}
WriteLog "Execute: ${WUTEST_BIN} " "${OBT_LOG_FILE}"
set -x
LOG_DATE=$(date "+%Y-%m-%d_%H-%M-%S")
WUTEST_LOG_FILE="${WUTEST_LOG_DIR}/wutest-${LOG_DATE}.log"
WUTEST_SUMMARY_FILE=${WUTEST_LOG_DIR}/wutest.summary
${WUTEST_CMD} >> $WUTEST_LOG_FILE 2>&1
WriteLog "Archieve wutest results directory: '${WUTEST_RESULT_DIR}' " "${OBT_LOG_FILE}"
# Pack the result directory into ${WUTEST_LOG_DIR}
zip ${WUTEST_LOG_DIR}/wutest-result-${LOG_DATE} ${WUTEST_RESULT_DIR}/*
# Create wutest.summary file
# [INFO] Success count: 22
# [INFO] Failure count: 24
INFO=$( egrep -i '\[INFO\] (succ|fail)' ${WUTEST_LOG_FILE} )
if [ -n "$INFO" ]
then
success=0
failure=0
success=$( echo $INFO | sed -n "s/^\(.*\)Success count\:[[:space:]]*\([0-9]*\).*$/\2/p" )
failure=$( echo $INFO | sed -n "s/^\(.*\)Failure count\:[[:space:]]*\([0-9]*\).*$/\2/p" )
total=$(( $success + $failure ))
WriteLog "TestResult:wutest:total :${total} passed:${success} failed:${failure}" "${OBT_LOG_FILE}"
echo "TestResult:wutest:total:${total} passed:${success} failed:${failure}" >> $WUTEST_SUMMARY_FILE
else
WriteLog "Wrong result generated." "${OBT_LOG_FILE}"
fi
set +x
cd ${OBT_BIN_DIR}
# -----------------------------------------------------
#
# Uninstall HPCC
#
WriteLog "Uninstall HPCC-Platform" "${OBT_LOG_FILE}"
[ -d ${BUILD_DIR}/${BUILD_TYPE}/build ] && cd ${BUILD_DIR}/${BUILD_TYPE}/build
UninstallHPCC "${OBT_LOG_FILE}" "${REGRESSION_WIPE_OFF_HPCC}"
WriteLog "Copy regression uninstall logs" "${OBT_LOG_FILE}"
[ ! -d ${TARGET_DIR}/test ] && mkdir -p ${TARGET_DIR}/test
[ -f uninstall.log ] && cp uninstall.log ${TARGET_DIR}/test/
[ -f uninstall.summary ] && cp uninstall.summary ${TARGET_DIR}/test/
else
WriteLog "wutest not found." "${OBT_LOG_FILE}"
fi
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "***********************" "${OBT_LOG_FILE}"
WriteLog " Wutest done. " "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
else
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "***********************" "${OBT_LOG_FILE}"
WriteLog " Skip wutest test " "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
fi
if [ $RUN_COVERAGE -eq 1 ]
then
#-----------------------------------------------------------------------------
#
# Coverage
# Placed here to avoid any disturbance to regression test execution and result handling
WriteLog " " "${OBT_LOG_FILE}"
WriteLog "***********************" "${OBT_LOG_FILE}"
WriteLog "Execute Coverage test" "${OBT_LOG_FILE}"
WriteLog " " "${OBT_LOG_FILE}"
cd ${OBT_BIN_DIR}
./coverage.sh
cp ~/test/coverage.summary ${TARGET_DIR}/test/
cd ${OBT_BIN_DIR}
WriteLog "Archive coverage testing logs" "${OBT_LOG_FILE}"
./archiveLogs.sh coverage timestamp=${OBT_TIMESTAMP}
WriteLog "Coverage test done." "${OBT_LOG_FILE}"
# -----------------------------------------------------
#
# Uninstall HPCC
#