From 502383a0cfdce511eb2f5e650cba3d1f3837cda7 Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Thu, 23 Dec 2021 19:18:36 +0000 Subject: [PATCH 1/2] Bump ATH (#6102) --- essentials.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/essentials.yml b/essentials.yml index df1f6639ee6c..85d1dba0eb74 100644 --- a/essentials.yml +++ b/essentials.yml @@ -1,7 +1,7 @@ --- ath: useLocalSnapshots: false - athRevision: "acceptance-test-harness-1.108" + athRevision: "acceptance-test-harness-1.109" athImage: "jenkins/ath:1.97-pre" categories: - org.jenkinsci.test.acceptance.junit.SmokeTest From 86ce50e78fed3dcd96d64679459af2e8ff6547f5 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Thu, 23 Dec 2021 11:19:50 -0800 Subject: [PATCH 2/2] Display JUnit test results as they appear (#6091) Co-authored-by: Jesse Glick --- Jenkinsfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 93d06f7155ec..c4fca9efa1fd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,8 +7,6 @@ def buildNumber = BUILD_NUMBER as int; if (buildNumber > 1) milestone(buildNumber - 1); milestone(buildNumber) // JENKINS-43353 / JENKINS-58625 -// TEST FLAG - to make it easier to turn on/off unit tests for speeding up access to later stuff. -def runTests = true def failFast = false // Same memory sizing for both builds and ATH def javaOpts = ["JAVA_OPTS=-Xmx1536m -Xms512m","MAVEN_OPTS=-Xmx1536m -Xms512m"] @@ -48,21 +46,21 @@ for(j = 0; j < jdks.size(); j++) { // Now run the actual build. stage("${buildType} Build / Test") { timeout(time: 300, unit: 'MINUTES') { + realtimeJUnit(healthScaleFactor: 20.0, testResults: '*/target/surefire-reports/*.xml,war/junit.xml') { // -Dmaven.repo.local=… tells Maven to create a subdir in the temporary directory for the local Maven repository // -ntp requires Maven >= 3.6.1 - def mvnCmd = "mvn -Pdebug -Pjapicmp -U -Dset.changelist help:evaluate -Dexpression=changelist -Doutput=$changelistF clean install ${runTests ? '-Dmaven.test.failure.ignore' : '-DskipTests'} -V -B -ntp -Dmaven.repo.local=$m2repo -Dspotbugs.failOnError=false -Dcheckstyle.failOnViolation=false -e" + def mvnCmd = "mvn -Pdebug -Pjapicmp -U -Dset.changelist help:evaluate -Dexpression=changelist -Doutput=$changelistF clean install -Dmaven.test.failure.ignore -V -B -ntp -Dmaven.repo.local=$m2repo -Dspotbugs.failOnError=false -Dcheckstyle.failOnViolation=false -e" infra.runWithMaven(mvnCmd, jdk.toString(), javaOpts, true) if(isUnix()) { sh 'git add . && git diff --exit-code HEAD' } + } } } // Once we've built, archive the artifacts and the test results. stage("${buildType} Publishing") { - if (runTests) { - junit healthScaleFactor: 20.0, testResults: '*/target/surefire-reports/*.xml,war/junit.xml' archiveArtifacts allowEmptyArchive: true, artifacts: '**/target/surefire-reports/*.dumpstream' if (! fileExists('core/target/surefire-reports/TEST-jenkins.Junit4TestsRanTest.xml') ) { error 'junit 4 tests are no longer being run for the core package' @@ -73,7 +71,6 @@ for(j = 0; j < jdks.size(); j++) { if (failFast && currentBuild.result == 'UNSTABLE') { error 'There were test failures; halting early' } - } if (buildType == 'Linux' && jdk == jdks[0]) { def folders = env.JOB_NAME.split('/') if (folders.length > 1) {