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

xunit/cppunit causes exception when trying to scan a non-accessible directory

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      Linux
    • Similar Issues:

      Description

      In our build system we use what we called virtual packages which create
      symlinks that point out of the build tree.

      In the exception message fragment:

      Caused by: IO error scanning directory '/work/hudson/workspace/Central_Processor/trunk/3rdParty/openmpi/trunk/install/lib/ssl/private'

      The path:
      /work/hudson/workspace/Central_Processor/trunk/3rdParty/openmpi/trunk/install
      is a symlink to /usr.

      Our CppUnit Pattern '*/tests/-results.xml' means that it tries to explore
      the entire /usr hierarchy and comes across directories that it cannot access.

      Ok in our case we can avoid this by restricting our CppUnit Pattern to only
      one part of the tree which (by definition) cannot contain virtual packages
      and is only place where unit tests are found.

      However I do not think an exception is the correct thing to do.
      It would be better to just log inaccessible directories and continue.
      Yes ours is unusual case but it is conceivable that a build system could
      create inaccessible directories even within the checked out tree.

      Also Hudson reported everything ok and it was only by examining the console
      log that this problem was discovered.

      The last part of the console message is given below.
      ==========================================================================
      Result Summary:
      ============================
      simple PASS
      [xUnit] Starting to record.
      [xUnit] [CppUnit] - Use the embedded style sheet.
      ERROR: Publisher com.thalesgroup.hudson.plugins.xunit.XUnitPublisher aborted due to exception
      hudson.util.IOException2: The plugin hasn't been performed correctly.
      at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:126)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:550)
      at hudson.model.Build$RunnerImpl.post2(Build.java:152)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528)
      at hudson.model.Run.run(Run.java:1233)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:122)
      Caused by: hudson.util.IOException2: remote file operation failed: /work/hudson/workspace/Central_Processor at hudson.remoting.Channel@4d885088:mymachine
      at hudson.FilePath.act(FilePath.java:690)
      at hudson.FilePath.act(FilePath.java:676)
      at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:99)
      ... 10 more
      Caused by: hudson.util.IOException2: Problem on converting into JUnit reports.
      at com.thalesgroup.hudson.plugins.xunit.transformer.XUnitTransformer.invoke(XUnitTransformer.java:154)
      at com.thalesgroup.hudson.plugins.xunit.transformer.XUnitTransformer.invoke(XUnitTransformer.java:57)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1962)
      at hudson.remoting.UserRequest.perform(UserRequest.java:114)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:270)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
      at java.util.concurrent.FutureTask.run(FutureTask.java:123)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: IO error scanning directory '/work/hudson/workspace/Central_Processor/trunk/3rdParty/openmpi/trunk/install/lib/ssl/private'
      at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1065)
      at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1100)
      at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1100)
      at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1100)
      at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1100)
      at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1100)
      at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1100)
      at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1100)
      at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1100)
      at org.apache.tools.ant.DirectoryScanner.checkIncludePatterns(DirectoryScanner.java:856)
      at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:817)
      at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:435)
      at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:400)
      at com.thalesgroup.hudson.plugins.xunit.transformer.XUnitTransformer.findtReports(XUnitTransformer.java:189)
      at com.thalesgroup.hudson.plugins.xunit.transformer.XUnitTransformer.processTool(XUnitTransformer.java:272)
      at com.thalesgroup.hudson.plugins.xunit.transformer.XUnitTransformer.invoke(XUnitTransformer.java:134)
      ... 11 more
      Finished: SUCCESS

        Attachments

          Activity

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              am50em am50em
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: