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

When using CCM with a parameterized build, report generation fails because the parameters are passed to ccm.exe and treated as source folders

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • ccm-plugin
    • None
    • Windows 2008 SR2 / Apache Tomcat / Hudson 1.387 / CCM Plugin 1.1

      When a build is parameterized, those parameters are passed to ccm.exe on the command line, and this totally screws up the creation of the ccm.result.xml file.

      I have a parameter that accepts a Mercurial revision id.

      Here is the relevant section of the build log:

      13:00:11 Path To CCM.exe: C:\Program Files (x86)\ccm\bin\ccm.exe
      13:00:11 Creating CCM config file C:\Hudson\jobs\Messaging\workspace\ccm.config.xml
      13:00:11 Writing CCM configuration into file
      13:00:11 <ccm>
      13:00:11 <exclude>
      13:00:11 <file>*.designer.cs</file>
      13:00:11 <folder>contrib</folder>
      13:00:11 </exclude>
      13:00:11 <analyze>
      13:00:11 </analyze>
      13:00:11 <recursive>yes</recursive>
      13:00:11 <outputXML>yes</outputXML>
      13:00:11 <numMetrics>50</numMetrics>
      13:00:11 </ccm>
      13:00:11
      13:00:11 Executing CCM command: cmd.exe /C " "C:\Program Files (x86)\ccm\bin\ccm.exe" -P:HgRevId=82b039219c2ce8fe029a2384efebcfb6089306fd C:\Hudson\jobs\Messaging\workspace\ccm.config.xml > C:\Hudson\jobs\Messaging\workspace\ccm.result.xml && exit %%ERRORLEVEL%% "
      13:00:11 [workspace] $ cmd.exe /C " "C:\Program Files (x86)\ccm\bin\ccm.exe" -P:HgRevId=82b039219c2ce8fe029a2384efebcfb6089306fd C:\Hudson\jobs\Messaging\workspace\ccm.config.xml > C:\Hudson\jobs\Messaging\workspace\ccm.result.xml && exit %%ERRORLEVEL%% "

      You'll notice that -P:HgRevId=...

      The resultant ccm.result.xml file has this at the top:
      -Analyzing folder -P:HgRevId=82b039219c2ce8fe029a2384efebcfb6089306fd.

      So please prevent Hudson build parameters from being passed to ccm.exe to solve the issue.

            cesar1983 cesar1983
            iristyle Iristyle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: