forked from cms-sw/cms-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-pr-tests
executable file
·474 lines (374 loc) · 17.2 KB
/
run-pr-tests
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
#!/bin/sh -ex
# In case we have kerberos and aklog reset token every time you run.
if [ ! X`which aklog` = X ]; then
aklog
fi
if [ ! X`which kinit` = X ]; then
kinit cmsbuild@CERN.CH -k -t ~/private/cmsbuild.keytab
fi
# to not modify the behavior of other scripts that use the AUTO_POST_MESSAGE parameter
if [ "X$AUTO_POST_MESSAGE" != Xtrue ]; then
DRY_RUN='--no-post'
fi
cd "$WORKSPACE"
git clone https://github.com/$CMS_GIT_TOOLS_REPO/cms-git-tools
### this is for triggering the comparison with the baseline
PULL_REQUEST_NUMBER=$PULL_REQUEST
PULL_REQUEST_JOB_ID=${BUILD_NUMBER}
### to know at the end of the tests if everything went ok
ALL_OK=true
BUILD_OK=true
UNIT_TESTS_OK=true
RELVALS_OK=true
# Checkout the correct ref
pushd cms-git-tools
git checkout $CMS_GIT_TOOLS_REF
popd
export PATH=$PWD/cms-git-tools:$PATH
which git-cms-merge-topic
git config --global user.name "Cms Build"
git config --global user.github cmsbuild
git config --global user.email cmsbuild@cern.ch
export SCRAM_ARCH=$ARCHITECTURE
if [[ $RELEASE_FORMAT != *-* ]]; then
RELEASE_QUEUE=$RELEASE_FORMAT
RELEASE_FORMAT=`scram l -c $RELEASE_FORMAT | tail -1 | awk '{print $2}'`
else
RELEASE_QUEUE=`$WORKSPACE/cms-bot/get-pr-branch $PULL_REQUEST`
fi
# creation of results summary file
cp $WORKSPACE/cms-bot/templates/PullRequestSummary.html $WORKSPACE/summary.html
cp $WORKSPACE/cms-bot/templates/js/renderPRTests.js $WORKSPACE/renderPRTests.js
RESULTS_FILE=$WORKSPACE/testsResults.txt
touch $RESULTS_FILE
echo 'PR_NUMBER;'$PULL_REQUEST >> $RESULTS_FILE
echo 'ADDITIONAL_PRS;'$ADDITIONAL_PULL_REQUESTS >> $RESULTS_FILE
echo 'BASE_IB;'$RELEASE_FORMAT >> $RESULTS_FILE
echo 'BUILD_NUMBER;'$BUILD_NUMBER >> $RESULTS_FILE
scram project $RELEASE_FORMAT
cd $RELEASE_FORMAT
eval `scram run -sh`
cd src
git config --global --replace-all merge.renamelimit 2500
# Requests is used to mark the commits
# We should really make this part of the system requirements.
pushd $WORKSPACE/cms-bot
wget --no-check-certificate https://pypi.python.org/packages/source/r/requests/requests-2.3.0.tar.gz#md5=7449ffdc8ec9ac37bbcd286003c80f00
tar -xvf requests-2.3.0.tar.gz
mv requests-2.3.0/requests/ requests
popd
GIT_MERGE_RESULT_FILE=$WORKSPACE/git-merge-result
# use the branch name if necesary
if [ "X$BRANCH_NAME" = X ]; then
git cms-merge-topic -u $PULL_REQUEST 2>&1 | tee -a $GIT_MERGE_RESULT_FILE
else
git cms-merge-topic -u $BRANCH_NAME 2>&1 | tee -a $GIT_MERGE_RESULT_FILE
fi
# this is to test several pull requests at the same time
for PR in ${ADDITIONAL_PULL_REQUESTS//,/ }; do
echo 'I will add the following pull request to the test'
echo $PR;
git cms-merge-topic -u $PR 2>&1 | tee -a $GIT_MERGE_RESULT_FILE
done
if grep 'Automatic merge failed' $GIT_MERGE_RESULT_FILE; then
$WORKSPACE/cms-bot/report-pull-request-results NOT_MERGEABLE --pr $PULL_REQUEST_NUMBER --pr-job-id $PULL_REQUEST_JOB_ID $DRY_RUN
exit 0
fi
if grep "Couldn't find remote ref" $GIT_MERGE_RESULT_FILE; then
echo "Please add the branch name to the parameters"
$WORKSPACE/cms-bot/report-pull-request-results REMOTE_REF_ISSUE --pr $PULL_REQUEST_NUMBER --pr-job-id $PULL_REQUEST_JOB_ID $DRY_RUN
exit 1
fi
#If Fireworks is the only package involved I only compile and run unit tests
ONLY_FIREWORKS=false
if [ "X$APPLY_FIREWORKS_RULE" = Xtrue ]; then
ls $WORKSPACE/$RELEASE_FORMAT/src
NUM_DIRS=$((`(find $WORKSPACE/$RELEASE_FORMAT/src -maxdepth 1 -type d -print | grep -v '.git' | grep -v 'FWCore' | wc -l)`-1))
if [ "$NUM_DIRS" == 1 ]; then
if ls | grep 'Fireworks'; then
ONLY_FIREWORKS=true
echo 'This pr only involves Fireworks!'
echo 'Only compiling and running unit tests'
fi
fi
fi
#get the latest commit and mark it as pending
pushd $WORKSPACE/$RELEASE_FORMAT/src
if [ "X$BRANCH_NAME" = X ]; then
LAST_COMMIT=`git log cms-sw/refs/pull/$PULL_REQUEST/head --pretty="%H" | head -n1`
else
LAST_COMMIT=`git log ${BRANCH_NAME//:/\/} --pretty="%H" | head -n1`
fi
popd
$WORKSPACE/cms-bot/report-pull-request-results TESTS_RUNNING --pr $PULL_REQUEST_NUMBER -c $LAST_COMMIT --pr-job-id $PULL_REQUEST_JOB_ID $DRY_RUN
############################################
# Force the run of DQM tests if necessary
############################################
if ls $WORKSPACE/$RELEASE_FORMAT/src/| grep -i -E "dqm.*|HLTriggerOffline|Validation"; then
echo "I will make sure that DQM tests will be run"
if ls $WORKSPACE/$RELEASE_FORMAT/src/| grep "DQMServices"; then
echo “DQMServices is already there”
if ls $WORKSPACE/$RELEASE_FORMAT/src/DQMServices/| grep "Components"; then
echo "and DQMServices/Components is there"
else
git cms-addpkg DQMServices/Components
fi
else
echo "checking out DQMServices"
git cms-addpkg DQMServices
fi
fi
git log --oneline --merges ${CMSSW_VERSION}..
git cms-checkdeps -A -a
$WORKSPACE/cms-bot/report-pull-request-results TESTS_RUNNING --pr $PULL_REQUEST_NUMBER -c $LAST_COMMIT --pr-job-id $PULL_REQUEST_JOB_ID --add-message "Compiling" $DRY_RUN
# #############################################
# test compilation with Clang
# ############################################
echo 'test clang compilation'
CONFIG_MAP_URL="https://raw.githubusercontent.com/cms-sw/cms-bot/master/config.map"
NEED_CLANG_TEST=false
if curl $CONFIG_MAP_URL | grep $RELEASE_QUEUE | grep PRS_TEST_CLANG= | grep SCRAM_ARCH=$ARCHITECTURE; then
NEED_CLANG_TEST=true
fi
if [ "X$TEST_CLANG_COMPILATION" = Xtrue -a $NEED_CLANG_TEST = true ]; then
$WORKSPACE/cms-bot/report-pull-request-results TESTS_RUNNING --pr $PULL_REQUEST_NUMBER -c $LAST_COMMIT --pr-job-id $PULL_REQUEST_JOB_ID --add-message "Testing Clang compilation" $DRY_RUN
#first, add the command to the log
CLANG_CMD="scram b vclean && scram build -k -j $(getconf _NPROCESSORS_ONLN) USER_CXXFLAGS='-fsyntax-only' COMPILER='llvm compile'"
echo $CLANG_CMD > $WORKSPACE/buildClang.log
scram b vclean && scram build -k -j $(getconf _NPROCESSORS_ONLN) USER_CXXFLAGS='-fsyntax-only' COMPILER='llvm compile' 2>&1 | tee -a $WORKSPACE/buildClang.log
if grep -E "^gmake: .* Error [0-9]" $WORKSPACE/buildClang.log; then
echo "Errors when testing compilation with clang"
echo 'CLANG_COMPILATION_RESULTS;ERROR' >> $RESULTS_FILE
ALL_OK=false
CLANG_BUILD_OK=false
else
echo "the clan compilation had no errors!!"
echo 'CLANG_COMPILATION_RESULTS;OK' >> $RESULTS_FILE
fi
else
echo 'CLANG_COMPILATION_RESULTS;NOTRUN' >> $RESULTS_FILE
fi
# #############################################
# test compilation with GCC
# ############################################
COMPILATION_CMD="scram b vclean && scram b -k -j $(getconf _NPROCESSORS_ONLN)"
echo $COMPILATION_CMD > $WORKSPACE/build.log
scram b vclean && scram b -k -j $(getconf _NPROCESSORS_ONLN) 2>&1 | tee -a $WORKSPACE/build.log
echo 'END OF BUILD LOG'
echo '--------------------------------------'
if grep -E "^gmake: .* Error [0-9]" $WORKSPACE/build.log; then
echo "Errors when building"
echo 'COMPILATION_RESULTS;ERROR' >> $RESULTS_FILE
ALL_OK=false
BUILD_OK=false
else
echo "the build had no errors!!"
echo 'COMPILATION_RESULTS;OK' >> $RESULTS_FILE
fi
#
# Unit tests
#
if [ "X$DO_TESTS" = Xtrue -a "X$BUILD_OK" = Xtrue ]; then
$WORKSPACE/cms-bot/report-pull-request-results TESTS_RUNNING --pr $PULL_REQUEST_NUMBER -c $LAST_COMMIT --pr-job-id $PULL_REQUEST_JOB_ID --add-message "Running Unit Tests" $DRY_RUN
echo '--------------------------------------'
UTESTS_CMD="scram b -k -j $(getconf _NPROCESSORS_ONLN) runtests"
echo $UTESTS_CMD > $WORKSPACE/unitTests.log
scram b -k -j $(getconf _NPROCESSORS_ONLN) runtests 2>&1 | tee -a $WORKSPACE/unitTests.log
echo 'END OF UNIT TESTS'
echo '--------------------------------------'
#######################################
# check if DQM Tests where run
#######################################
if ls $WORKSPACE/$RELEASE_FORMAT/src/DQMServices/Components/test/ | grep -v -E "[a-z]+"; then
echo "DQM Tests were run!"
pushd $WORKSPACE/$RELEASE_FORMAT/src/DQMServices/Components/test/
ls | grep -v -E "[a-z]+" | xargs -I ARG mv ARG DQMTestsResults
mkdir $WORKSPACE/DQMTestsResults
cp -r DQMTestsResults $WORKSPACE/DQMTestsResults
ls $WORKSPACE
popd
echo 'DQM_TESTS;OK' >> $RESULTS_FILE
else
echo 'DQM_TESTS;NOTRUN' >> $RESULTS_FILE
fi
if grep -i "had errors" $WORKSPACE/unitTests.log; then
echo "Errors in the unit tests"
echo 'UNIT_TEST_RESULTS;ERROR' >> $RESULTS_FILE
ALL_OK=false
UNIT_TESTS_OK=false
else
echo 'UNIT_TEST_RESULTS;OK' >> $RESULTS_FILE
fi
else
echo 'UNIT_TEST_RESULTS;NOTRUN' >> $RESULTS_FILE
echo 'DQM_TESTS;NOTRUN' >> $RESULTS_FILE
fi
#
# Static checks
#
if [ "X$DO_STATIC_CHECKS" = Xtrue -a "$ONLY_FIREWORKS" = false ]; then
$WORKSPACE/cms-bot/report-pull-request-results TESTS_RUNNING --pr $PULL_REQUEST_NUMBER -c $LAST_COMMIT --pr-job-id $PULL_REQUEST_JOB_ID --add-message "Running Static Checks" $DRY_RUN
echo 'STATIC_CHECKS;OK' >> $RESULTS_FILE
echo '--------------------------------------'
pushd $WORKSPACE/$RELEASE_FORMAT
git cms-addpkg Utilities/StaticAnalyzers
mkdir $WORKSPACE/llvm-analysis
SCRAM_IGNORE_PACKAGES="Fireworks/% Utilities/StaticAnalyzers" USER_LLVM_CHECKERS="-enable-checker threadsafety -enable-checker cms -disable-checker cms.FunctionDumper" scram b -k -j $(getconf _NPROCESSORS_ONLN) checker SCRAM_IGNORE_SUBDIRS=test 2>&1 | tee -a $WORKSPACE/llvm-analysis/runStaticChecks.log
pwd
cp -R $WORKSPACE/$RELEASE_FORMAT/llvm-analysis/*/* $WORKSPACE/llvm-analysis || true
echo 'END OF STATIC CHECKS'
echo '--------------------------------------'
popd
else
echo 'STATIC_CHECKS;NOTRUN' >> $RESULTS_FILE
fi
#
# Matrix tests
#
JOB_REPORTS=""
if [[ $RELEASE_FORMAT != CMSSW_5_3_X* ]] && [ "X$USE_JOB_REPORTS" = Xtrue ]; then
JOB_REPORTS='--job-reports'
fi
if [ ! "X$MATRIX_EXTRAS" = X ]; then
MATRIX_EXTRAS="-l `echo $MATRIX_EXTRAS | sed -e 's/[^0-9., ]*//g'`"
fi
if [ "X$DO_SHORT_MATRIX" = Xtrue -a "X$BUILD_OK" = Xtrue -a "$ONLY_FIREWORKS" = false ]; then
$WORKSPACE/cms-bot/report-pull-request-results TESTS_RUNNING --pr $PULL_REQUEST_NUMBER -c $LAST_COMMIT --pr-job-id $PULL_REQUEST_JOB_ID --add-message "Running RelVals" $DRY_RUN
echo '--------------------------------------'
mkdir "$WORKSPACE/runTheMatrix-results"
pushd "$WORKSPACE/runTheMatrix-results"
case $RELEASE_FORMAT in
*THREADED*)
THREADED_PARAM='--command \"--customise FWCore/Concurrency/dropNonMTSafe.dropNonMTSafe\"'
;;
*)
esac
case $RELEASE_FORMAT in
*SLHC*)
SLHC_PARAM='-w upgrade'
WF_LIST="-l 10000,10061,10200,10261,12200,12261,14400,14461,12600,12661,14000,14061,12800,12861,13000,13061,13600,13661,13800,13861"
;;
*)
WF_LIST="-s $MATRIX_EXTRAS"
;;
esac
# MATRIX_TIMEOUT is set by jenkins
dateBefore=$(date +"%s")
# The --das-options are not correctly interpreted when set as a variable
if [[ $RELEASE_FORMAT != CMSSW_5_3_X* ]] && [ "X$USE_DAS_CACHE" = Xtrue ]; then
wget --no-check-certificate https://raw.githubusercontent.com/cms-sw/cmsdist/HEAD/das-cache.file
RELVALS_CMD="timeout $MATRIX_TIMEOUT runTheMatrix.py $THREADED_PARAM --das-options=\"--cache das-cache.file --limit 0\" $SLHC_PARAM $JOB_REPORTS -j $(getconf _NPROCESSORS_ONLN) $WF_LIST"
echo $RELVALS_CMD > $WORKSPACE/matrixTests.log
timeout $MATRIX_TIMEOUT runTheMatrix.py $THREADED_PARAM --das-options="--cache das-cache.file --limit 0" $SLHC_PARAM $JOB_REPORTS -j $(getconf _NPROCESSORS_ONLN) $WF_LIST 2>&1 | tee -a $WORKSPACE/matrixTests.log
else
RELVALS_CMD="timeout $MATRIX_TIMEOUT runTheMatrix.py $THREADED_PARAM $SLHC_PARAM $JOB_REPORTS -j $(getconf _NPROCESSORS_ONLN) $WF_LIST"
echo $RELVALS_CMD > $WORKSPACE/matrixTests.log
timeout $MATRIX_TIMEOUT runTheMatrix.py $THREADED_PARAM $SLHC_PARAM $JOB_REPORTS -j $(getconf _NPROCESSORS_ONLN) $WF_LIST 2>&1 | tee -a $WORKSPACE/matrixTests.log
fi
dateAfter=$(date +"%s")
diff=$(($dateAfter-$dateBefore))
if [ "$diff" -ge $MATRIX_TIMEOUT ]; then
echo "------------" >> $WORKSPACE/matrixTests.log
echo 'ERROR TIMEOUT' >> $WORKSPACE/matrixTests.log
fi
popd
if grep -i -E "ERROR .*" $WORKSPACE/matrixTests.log; then
echo "Errors in the RelVals"
echo 'MATRIX_TESTS;ERROR' >> $RESULTS_FILE
echo 'COMPARISON;NOTRUN' >> $RESULTS_FILE
ALL_OK=false
RELVALS_OK=false
else
echo "no errors in the RelVals!!"
echo 'MATRIX_TESTS;OK' >> $RESULTS_FILE
echo 'COMPARISON;QUEUED' >> $RESULTS_FILE
REAL_ARCH=-`cat /proc/cpuinfo | grep vendor_id | head -n 1 | sed "s/.*: //"`
TRIGGER_COMPARISON_FILE=$WORKSPACE/'comparison.properties'
echo "Creating properties file $TRIGGER_COMPARISON_FILE"
echo "RELEASE_FORMAT=$RELEASE_FORMAT" > $TRIGGER_COMPARISON_FILE
echo "ARCHITECTURE=${ARCHITECTURE}" >> $TRIGGER_COMPARISON_FILE
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> $TRIGGER_COMPARISON_FILE
echo "PULL_REQUEST_JOB_ID=${BUILD_NUMBER}" >> $TRIGGER_COMPARISON_FILE
echo "REAL_ARCH=$REAL_ARCH" >> $TRIGGER_COMPARISON_FILE
#####################################################################
#### Run igprof
#####################################################################
# for now this is only run for 25202
if [ "X$RUN_IGPROF" = Xtrue ]; then
echo 'IGPROF;QUEQUED' >> $RESULTS_FILE
TRIGGER_IGPROF_FILE=$WORKSPACE/'igprof.properties'
echo "Creating properties file $TRIGGER_IGPROF_FILE"
echo "RELEASE_FORMAT=$RELEASE_FORMAT" > $TRIGGER_IGPROF_FILE
echo "ARCHITECTURE=${ARCHITECTURE}" >> $TRIGGER_IGPROF_FILE
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> $TRIGGER_IGPROF_FILE
echo "PULL_REQUEST_JOB_ID=${BUILD_NUMBER}" >> $TRIGGER_IGPROF_FILE
echo "LAST_COMMIT=${LAST_COMMIT}" >> $TRIGGER_IGPROF_FILE
echo "AUTO_POST_MESSAGE=${AUTO_POST_MESSAGE}" >> $TRIGGER_IGPROF_FILE
else
echo 'IGPROF;NOTRUN' >> $RESULTS_FILE
fi
#####################################################################
#### Run cfg-viewer
#####################################################################
if [ "X$RUN_CONFIG_VIEWER" = Xtrue ]; then
mkdir -p "$WORKSPACE/cfg-viewerResults"
pushd "$WORKSPACE/cfg-viewerResults"
cfg-viewer.py -r -s "$WORKSPACE/runTheMatrix-results"
popd
sed -i "s/<!--CONFIG_FILES_BROWSER//g" $WORKSPACE/summary.html
sed -i "s/CONFIG_FILES_BROWSER-->//g" $WORKSPACE/summary.html
sed -i "s/PARAM_CONFIG_BROWSER/https:\/\/cmssdt.cern.ch\/SDT\/jenkins-artifacts\/pull-request-integration\/PR-${PULL_REQUEST}\/${BUILD_NUMBER}\/cfg-viewerResults\//g" $WORKSPACE/summary.html
fi
fi
else
echo 'MATRIX_TESTS;NOTRUN' >> $RESULTS_FILE
echo 'COMPARISON;NOTRUN' >> $RESULTS_FILE
echo 'IGPROF;NOTRUN' >> $RESULTS_FILE
fi
#
# Duplicate checks
#
if [ "X$DO_DUPLICATE_CHECKS" = Xtrue -a "$ONLY_FIREWORKS" = false ]; then
pushd $CMSSW_BASE/src
eval `scram run -sh`
echo '--------------------------------------'
echo "check dup dicts"
duplicateReflexLibrarySearch.py --dir ./ --dup 2>&1 | tee -a $WORKSPACE/duplicateChecks.log
echo "check wrong dict locations"
duplicateReflexLibrarySearch.py --dir ./ --lostDefs 2>&1 | tee -a $WORKSPACE/duplicateChecks.log
echo "check dup plugins"
duplicateReflexLibrarySearch.py --edmPD 2>&1 | tee -a $WORKSPACE/duplicateChecks.log
echo '--------------------------------------'
popd
fi
#
# Valgrind tests
#
for WF in ${WORKFLOWS_FOR_VALGRIND_TEST//,/ }; do
$WORKSPACE/cms-bot/report-pull-request-results TESTS_RUNNING --pr $PULL_REQUEST_NUMBER -c $LAST_COMMIT --pr-job-id $PULL_REQUEST_JOB_ID --add-message "Running Valgrind" $DRY_RUN
echo 'I will run valgrind for the following workflow'
echo $WF;
mkdir -p "$WORKSPACE/valgrindResults-"$WF
pushd "$WORKSPACE/valgrindResults-"$WF
runTheMatrix.py --command '-n 10 --prefix "time valgrind --tool=memcheck --suppressions=$CMSSW_RELEASE_BASE/src/Utilities/ReleaseScripts/data/cms-valgrind-memcheck.supp --num-callers=20 --xml=yes --xml-file=valgrind.xml " ' -l $WF
popd
done
#evaluate results
if $ALL_OK ; then
echo $ALL_OK
$WORKSPACE/cms-bot/report-pull-request-results TESTS_OK_PR --pr $PULL_REQUEST_NUMBER -c $LAST_COMMIT --pr-job-id $PULL_REQUEST_JOB_ID $DRY_RUN
elif [ "X$BUILD_OK" = Xfalse ]; then
echo $BUILD_OK
$WORKSPACE/cms-bot/report-pull-request-results PARSE_BUILD_FAIL --pr $PULL_REQUEST_NUMBER -c $LAST_COMMIT --pr-job-id $PULL_REQUEST_JOB_ID --unit-tests-file $WORKSPACE/build.log $DRY_RUN
elif [ "X$UNIT_TESTS_OK" = Xfalse ]; then
echo $UNIT_TESTS_OK
echo 'failure in unit tests'
$WORKSPACE/cms-bot/report-pull-request-results PARSE_UNIT_TESTS_FAIL --pr $PULL_REQUEST_NUMBER -c $LAST_COMMIT --pr-job-id $PULL_REQUEST_JOB_ID --unit-tests-file $WORKSPACE/unitTests.log $DRY_RUN
elif [ "X$RELVALS_OK" = Xfalse ]; then
pushd $WORKSPACE/
$WORKSPACE/cms-bot/report-pull-request-results PARSE_MATRIX_FAIL --pr $PULL_REQUEST_NUMBER -c $LAST_COMMIT --pr-job-id $PULL_REQUEST_JOB_ID --unit-tests-file $WORKSPACE/matrixTests.log $DRY_RUN
popd
elif [ "X$CLANG_BUILD_OK" = Xfalse ]; then
$WORKSPACE/cms-bot/report-pull-request-results PARSE_CLANG_BUILD_FAIL --pr $PULL_REQUEST_NUMBER -c $LAST_COMMIT --pr-job-id $PULL_REQUEST_JOB_ID -f $WORKSPACE/buildClang.log $DRY_RUN
fi
ls