| stage 'Checkout from git' |
| git url: 'http://gerrit.named-data.net/ndn-tools' |
| sh "git fetch origin ${GERRIT_REFSPEC} && git checkout FETCH_HEAD" |
| stash name: 'code', includes: '**/*, .git/**/*', useDefaultExcludes: false |
| // Apparently, cannot use for-loop iteration, see https://issues.jenkins-ci.org/browse/JENKINS-27421 |
| for (int i = 0; i < labels.size(); i++) { |
| String label = labels.get(i); |
| wrap([$class: 'hudson.plugins.ansicolor.AnsiColorBuildWrapper', colorMapName: 'xterm']) { |
| sh "XUNIT=yes ./.jenkins" |
| if (label == "code-coverage") { |
| step([$class: 'CoberturaPublisher', autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'build/coverage.xml', failNoReports: true, failUnhealthy: false, failUnstable: false, maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false]) |
| // don't publish test results for code coverage run |
| step([$class: 'XUnitBuilder', testTimeMargin: '50000', thresholdMode: 1, tools: [[$class: 'BoostTestJunitHudsonTestType', deleteOutputFiles: true, failIfNotNew: true, pattern: 'build/xunit*.xml', skipNoTestFiles: true, stopProcessingIfError: true]]]) |