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

xUnit does not support symbolic link for input files



    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
    • Environment:
      plugin version: 1.48
      Jenkins v1.487
      Windows 2008 R2
    • Similar Issues:


      Recently, we switched our build system to use symbolic links instead of copying files around and turns out that the xUnit plugin does not work with them. The file is found, but plugin thinks that the file is empty.

      14:02:31 [xUnit] [INFO] - [CppUnit-1.12.1 (default)] - 1 test report file(s) were found with the pattern '*/exports/unittest//UnitTestResults.xml' relative to 'e:\sandbox\Runtime_trunk' for the testing framework 'CppUnit-1.12.1 (default)'.
      14:02:31 [xUnit] [ERROR] - The result file 'e:\sandbox\Runtime_trunk\outputs\exports\unittest\win32\UnitTestResults.xml' for the metric 'CppUnit' is empty. The result file has been skipped.

      I've looked into the code that causes failure; a call to:

      public boolean checkFileIsNotEmpty(File inputFile)

      { return inputFile.length() != 0; }

      The native symbolic links support was added to Java 7. I'm not sure if simply rebuilding plugin with JDK 7 will return non zero file size for symbolic links (Windows itself shows file size as zero) or is that even feasible as it forces Java 7. Or maybe the code needs to check first if the file is symbolic link and treat it differently.

      I guess another possible solution (assuming that we can read the file content in using old file class) would be to load the file content and check if that is non zero.




            • Assignee:
              gbois Gregory Boissinot
              msiemczyk Maciek Siemczyk
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: