Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
sync: Switch code to use ndn-cxx
Browse files Browse the repository at this point in the history
Thic commit also moves code to ndn::chronoshare namespace

Change-Id: I6eae8cab53fd68faa0e9523d166dbb60d1b59a95
  • Loading branch information
PhdLoLi authored and cawka committed Jan 13, 2017
1 parent a9369b4 commit e84adea
Show file tree
Hide file tree
Showing 8 changed files with 541 additions and 350 deletions.
64 changes: 40 additions & 24 deletions .Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
//////////////////////
#!/usr/bin/env groovy

stage 'Checkout from git'
stage 'Starting CI check'
node {
deleteDir()
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
}

//////////////////////
Expand All @@ -15,32 +11,52 @@ stage 'Parallel builds'
def labels = [
"OSX-10.12",
"Ubuntu-16.04-64bit",
"code-coverage"
"code-coverage",
]

def builds = [:]

// 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);

builds[label] = {
node(label) {
wrap([$class: 'hudson.plugins.ansicolor.AnsiColorBuildWrapper', colorMapName: 'xterm']) {
deleteDir()
unstash "code"

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])
} else {
// 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]]])
}
}
String label = labels.get(i);

builds[label] = {
node(label) {
wrap([$class: 'hudson.plugins.ansicolor.AnsiColorBuildWrapper', colorMapName: 'xterm']) {

deleteDir()
git url: 'https://gerrit.named-data.net/ChronoShare'
sh "git fetch origin ${GERRIT_REFSPEC} && git checkout FETCH_HEAD"

withEnv(["NODE_LABELS=\"$label\""]) {
sh "./.jenkins"
}

if (label == "code-coverage") {
publishHTML(target: [
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: 'build/coverage',
reportFiles: 'index.html',
reportName: "GCOVR Coverage Report"
])
// CoverturaPublisher is not yet supported by pipelines, see https://issues.jenkins-ci.org/browse/JENKINS-30700
// step([$class: 'CoberturaPublisher',
// coberturaReportFile: 'build/coverage.xml',
// autoUpdateHealth: false, autoUpdateStability: false, zoomCoverageChart: true,
// failNoReports: true, failUnhealthy: false, failUnstable: false,
// maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'UTF-8'])
} else {
// 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]]])
}
}
}
}
}

parallel builds
3 changes: 3 additions & 0 deletions .jenkins.d/20-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export ASAN_OPTIONS
# Run NFD and tests
sudo nfd &

# Give NFD a few seconds to start
sleep 10

# First run all tests as unprivileged user
./build/unit-tests $(ut_log_args)

Expand Down
Loading

0 comments on commit e84adea

Please sign in to comment.