diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 821c67ac7..cbab13cce 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -1,5 +1,7 @@ import groovy.transform.Field +/* SETTINGS */ + def test = 'go test -v ./...' def fast_build_platforms = [ @@ -20,6 +22,8 @@ def build_platforms = [ ['freebsd', 'amd64'] ] +/* PIPELINE UTILS */ + def setupStep(nodeLabel, f) { node(label: nodeLabel) { def ps = nodeLabel != 'windows' ? '/' : '\\' @@ -58,6 +62,8 @@ def gobuild_step(list) { } } +/* PIPELINE */ + ansiColor('xterm') { withEnv(['TERM=xterm-color']) { timeout(time: 30, unit: 'MINUTES') { stage('Checks') { parallel( @@ -66,6 +72,11 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) { timeout(time: 30, unit: 'MI run 'make test_go_fmt' } }, + 'go vet': { + setupStep('linux') { run -> + run 'go vet ./...' + } + }, 'go build': { gobuild_step(fast_build_platforms) } @@ -113,7 +124,7 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) { timeout(time: 30, unit: 'MI run "make gx-deps" try { - run "make -j12 -Otarget test/sharness/test-results/sharness.xml CONTINUE_ON_S_FAILURE=1 TEST_NO_FUSE=1" + run "make -j12 -Otarget test/sharness/test-results/sharness.xml CONTINUE_ON_S_FAILURE=1 TEST_NO_FUSE=1 TEST_NO_DOCKER=1" } catch (err) { throw err } finally { diff --git a/test/sharness/lib/0001-Generate-partial-JUnit-reports.patch b/test/sharness/lib/0001-Generate-partial-JUnit-reports.patch index 5150b0b61..32500da65 100644 --- a/test/sharness/lib/0001-Generate-partial-JUnit-reports.patch +++ b/test/sharness/lib/0001-Generate-partial-JUnit-reports.patch @@ -46,7 +46,7 @@ index 6750ff7..7d9915a 100644 +esc=$(printf '\033') + +esc_xml() { -+ sed 's/&/\&/g; s//\>/g; s/"/\"/g; s///g;' ++ sed 's/&/\&/g; s//\>/g; s/"/\"/g; s/'"$esc"'/\/g; s///g;' +} + test -n "$test_description" || error "Test script did not set test_description." diff --git a/test/sharness/lib/gen-junit-report.sh b/test/sharness/lib/gen-junit-report.sh index 5dfbba86a..c69f39adb 100755 --- a/test/sharness/lib/gen-junit-report.sh +++ b/test/sharness/lib/gen-junit-report.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash cat > test-results/sharness.xml <<-EOF - + $(find test-results -name '*.xml.part' | sort | xargs cat) diff --git a/test/sharness/lib/install-sharness.sh b/test/sharness/lib/install-sharness.sh index 03803510d..9a8c3fc74 100755 --- a/test/sharness/lib/install-sharness.sh +++ b/test/sharness/lib/install-sharness.sh @@ -7,7 +7,7 @@ # settings version=5eee9b51b5621cec95a64018f0cc779963b230d2 -patch_version=7 +patch_version=8 urlprefix=https://github.com/mlafeldt/sharness.git if test ! -n "$clonedir" ; then