Skip to content

Commit

Permalink
Merge pull request cms-sw#95 from nclopezo/add-k-pr-tests
Browse files Browse the repository at this point in the history
run-pr-tests: Added -k to scram b command for building and unit
  • Loading branch information
nclopezo committed Jul 25, 2014
2 parents 1f03c1c + 5d75107 commit 2dffe1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion report-pull-request-results
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ def read_matrix_log_file(repo,matrix_log,tests_url):
if options.commit_hash:
mark_commit( ACTION , options.commit_hash , tests_url )


#
# reads the build log file looking for the first error
# it includes 5 lines before and 5 lines after the error
#
def read_build_log_file(repo,build_log,tests_url):
pull_request = repo.get_pull(pr_number)
error_found = False
Expand All @@ -104,6 +107,7 @@ def read_build_log_file(repo,build_log,tests_url):
lines_before.append(line)
if (line_number > lines_to_keep_before):
lines_before.pop(0)
#this is how it determines that a line has an error
if 'error: ' in line:
error_found = True
error_line = line_number
Expand Down
4 changes: 2 additions & 2 deletions run-pr-tests
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ git cms-checkdeps -A -a
BUILD_LOG_URL=https:\/\/cmssdt.cern.ch\/SDT\/jenkins-artifacts\/pull-request-integration\/${BUILD_NUMBER}\/build.log
sed -i "s/PARAM_BUILD_LOG_URL/https:\/\/cmssdt.cern.ch\/SDT\/jenkins-artifacts\/pull-request-integration\/PR-${PULL_REQUEST}\/${BUILD_NUMBER}\/build.log/g" $WORKSPACE/summary.html

scram b -j 10 2>&1 | tee -a $WORKSPACE/build.log
scram b -k -j 10 2>&1 | tee -a $WORKSPACE/build.log
echo 'END OF BUILD LOG'
echo '--------------------------------------'

Expand All @@ -127,7 +127,7 @@ fi
if [ "X$DO_TESTS" = Xtrue -a "X$BUILD_OK" = Xtrue ]; then
sed -i "s/PARAM_UNIT_TESTS_URL/https:\/\/cmssdt.cern.ch\/SDT\/jenkins-artifacts\/pull-request-integration\/PR-${PULL_REQUEST}\/${BUILD_NUMBER}\/unitTests.log/g" $WORKSPACE/summary.html
echo '--------------------------------------'
scram b -j 12 runtests 2>&1 | tee -a $WORKSPACE/unitTests.log
scram b -k -j 12 runtests 2>&1 | tee -a $WORKSPACE/unitTests.log
echo 'END OF UNIT TESTS'
echo '--------------------------------------'
#######################################
Expand Down

0 comments on commit 2dffe1d

Please sign in to comment.