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

JUnitXML: README.txt is not a directory.

XMLWordPrintable

      The following XML in junit.xml leads to README.txt is not a directory.:

      <testcase classname="README.txt" file="README.txt" name="README.txt" time="0.00580596923828"></testcase>
      

      The complete error message is:

      Zeichne Testergebnisse auf.
      ERROR: Build step failed with exception
      .../PYTHON/Python2.7/README.txt is not a directory.
      	at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:488)
      	at hudson.util.DirScanner$Glob.scan(DirScanner.java:128)
      	at hudson.FilePath$42.invoke(FilePath.java:2162)
      	at hudson.FilePath$42.invoke(FilePath.java:2155)
      	at hudson.FilePath.act(FilePath.java:1018)
      	at hudson.FilePath.act(FilePath.java:996)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:2155)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:2141)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:2124)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:2109)
      	at hudson.plugins.junitattachments.GetTestDataMethodObject.attachFilesForReport(GetTestDataMethodObject.java:121)
      	at hudson.plugins.junitattachments.GetTestDataMethodObject.getAttachments(GetTestDataMethodObject.java:110)
      	at hudson.plugins.junitattachments.AttachmentPublisher.contributeTestData(AttachmentPublisher.java:54)
      	at hudson.plugins.junitattachments.AttachmentPublisher.contributeTestData(AttachmentPublisher.java:30)
      	at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:183)
      	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
      	at hudson.model.Build$BuildExecution.post2(Build.java:185)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
      	at hudson.model.Run.execute(Run.java:1745)
      	at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      Build step 'Veröffentliche JUnit-Testergebnisse.' marked build as failure
      

      The error occurs when updating py.test from 2.9.x to 3.0.
      In 2.9.x junit.xml contained:

      <testcase classname="" file="README.txt" name="README.txt" time="0.027095079422"></testcase>
      

      Aka classname was empty.

      It seems wrong that Jenkins complains about a file not being a directory because a value was added to classname.

      What are the expectations for the values of the testcase tag?
      Might this be a bug in the junit plugin?

      P.S.: I previously added a bug in the py.test issue tracker: #1862. This ticket might contain some additional information about the issue.

            Unassigned Unassigned
            icemac Michael Howitz
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: