Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-19186

Malformed TEST-*.xml causes whole build to be FAILED

XMLWordPrintable

      https://jenkins.ci.cloudbees.com/job/core/job/jenkins_main_trunk/1082/ was marked as FAILED because of

      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 59:47.169s
      [INFO] Finished at: Mon Aug 12 20:14:25 EDT 2013
      [INFO] Final Memory: 90M/727M
      [INFO] ------------------------------------------------------------------------
      Archiving artifacts
      Recording test results
      ERROR: Failed to archive test reports
      hudson.util.IOException2: remote file operation failed: /scratch/jenkins/workspace/core/jenkins_main_trunk at hudson.remoting.Channel@6c5632d0:s-bd117189
      	at hudson.FilePath.act(FilePath.java:900)
      	at hudson.FilePath.act(FilePath.java:877)
      	at hudson.tasks.junit.JUnitParser.parse(JUnitParser.java:87)
      	at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:122)
      	at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:134)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:812)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:784)
      	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:734)
      	at hudson.model.Run.execute(Run.java:1600)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:237)
      Caused by: hudson.util.IOException2: Failed to read /scratch/jenkins/workspace/core/jenkins_main_trunk/test/target/surefire-reports/TEST-hudson.tasks.EnvVarsInConfigTasksTest.xml
      	at hudson.tasks.junit.TestResult.parse(TestResult.java:284)
      	at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:223)
      	at hudson.tasks.junit.TestResult.parse(TestResult.java:158)
      	at hudson.tasks.junit.TestResult.parse(TestResult.java:141)
      	at hudson.tasks.junit.TestResult.<init>(TestResult.java:117)
      	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:117)
      	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:90)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2387)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:724)
      Caused by: org.dom4j.DocumentException: Error on line 118 of document file:///scratch/jenkins/workspace/core/jenkins_main_trunk/test/target/surefire-reports/TEST-hudson.tasks.EnvVarsInConfigTasksTest.xml : The reference to entity "amp" must end with the ';' delimiter. Nested exception: The reference to entity "amp" must end with the ';' delimiter.
      	at org.dom4j.io.SAXReader.read(SAXReader.java:482)
      	at org.dom4j.io.SAXReader.read(SAXReader.java:264)
      	at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:129)
      	at hudson.tasks.junit.TestResult.parse(TestResult.java:267)
      	... 16 more
      Caused by: org.xml.sax.SAXParseException; systemId: file:///scratch/jenkins/workspace/core/jenkins_main_trunk/test/target/surefire-reports/TEST-hudson.tasks.EnvVarsInConfigTasksTest.xml; lineNumber: 118; columnNumber: 26; The reference to entity "amp" must end with the ';' delimiter.
      	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
      	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
      	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)
      	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
      	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1388)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(XMLDocumentFragmentScannerImpl.java:1810)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2994)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
      	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
      	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
      	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
      	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
      	at org.dom4j.io.SAXReader.read(SAXReader.java:465)
      	... 19 more
      Build step 'Publish JUnit test result report' changed build result to FAILURE
      

      https://jenkins.ci.cloudbees.com/job/core/job/jenkins_main_trunk/ws/test/target/surefire-reports/TEST-hudson.tasks.EnvVarsInConfigTasksTest.xml is in fact not well-formed XML (perhaps a Surefire bug):

          <system-out>=== Starting EnvVarsInConfigTasksTest.testNativeMavenOnSlave
      #1 completed
      Legacy code started this job.  No cause information is available
      Building remotely on &amp#;[8mha:AAAAnB+LCAAAAAAAAP9b85aBtbiIQTGjNKU4P08vOT+vOD8nVc83PyU1x6OyILUoJzMv2y+/JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ+sxLJE/ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAy2EgYB/eT83ILSktQi/eKcxLJUQwA49mDyxQAAAA==&amp#;[0mslave1 in workspace /scratch/jenkins/workspace/core/jenkins_main_trunk/test/target/hudson8856170059407332280test/workspace/test0
      Deleting existing workspace /scratch/jenkins/workspace/core/jenkins_main_trunk/test/target/hudson8856170059407332280test/workspace/test0
      Staging file:/scratch/jenkins/workspace/core/jenkins_main_trunk/test/target/classes/simple-projects.zip
      ERROR: Maven Home /scratch/jenkins/workspace/core/jenkins_main_trunk/test/target/apache-maven-2.2.1${TOOLS_DUMMY_LOCATION} doesn't exist
      &amp#;[8mha:AAAAWB+LCAAAAAAAAP9b85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=&amp#;[0mFinished: FAILURE
      
      #2 completed
      </system-out>
      

      The fix of JENKINS-3149 is supposed to address this by adding a fake test failure. But it leaves in the older code which aborts the test archiving!

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: