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

xunit using the boost test plugin doesn't fail build when failing to parse output xml

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      ubuntu 10.04, xunit 1.6, boost test 1.40
    • Similar Issues:

      Description

      Here is an excerpt from a boost test run where an exception occurred:

      <Info file="/var/lib/hudson/jobs/ColdAtom/workspace/trunk/grain/test_model.cpp" line="247">check m->field_known() passed</Info>
      <Exception>memory access violation at address: 0x00000008: no mapping at fault address<LastCheckpoint file="/var/lib/hudson/jobs/ColdAtom/workspace/trunk/grain/test_model\
      .cpp" line="247"/></Exception>
      <Message file="./boost/test/impl/unit_test_log.ipp" line="164">Test is aborted</Message>
      <TestingTime>2950000</TestingTime>
      </TestCase>
      </TestSuite>
      </TestLog>

      Then the hudson log:
      [xUnit] [WARNING] - The file '/var/lib/hudson/jobs/ColdAtom/workspace/test_model.xml' is an invalid file.
      [xUnit] [WARNING] At line 1 of file:/var/lib/hudson/jobs/ColdAtom/workspace/test_model.xml:cvc-complex-type.2.4.a: Invalid content was found starting with element 'Exception'. One of '

      {Info, FatalError, Error, TestingTime}

      ' is expected.
      [xUnit] [WARNING] - The file '/var/lib/hudson/jobs/ColdAtom/workspace/test_model.xml' has been ignored.

      Boost test also inserts message tags which will fail to parse. This will happen when a unit test has no assertions. It would be nice if these errors would break the build at least. I do have "Fail the build if test results were not updated this run" checked, but it ignores the test and the build succeeds.

        Attachments

          Activity

          Hide
          gbois Gregory Boissinot added a comment -

          The error is due that your input file doesn't match the current expectation.
          The boost test results format is provided by an XSD file. This XSD was written for BoostTest 1.35.
          I don't know BoostTest 1.40, but maybe there is also the same error in boost test 1.35.

          Do you know XSD? If yes, could you fix it and attach the new XSD file at this issue.
          Otherwise, could you send me lots of your input boosttest result files in order to enhance the XSD based on your samples?

          Show
          gbois Gregory Boissinot added a comment - The error is due that your input file doesn't match the current expectation. The boost test results format is provided by an XSD file. This XSD was written for BoostTest 1.35. I don't know BoostTest 1.40, but maybe there is also the same error in boost test 1.35. Do you know XSD? If yes, could you fix it and attach the new XSD file at this issue. Otherwise, could you send me lots of your input boosttest result files in order to enhance the XSD based on your samples?
          Hide
          under2x under2x added a comment -

          I made some changes to the xsd and xsl to fix the issues I was having.

          Show
          under2x under2x added a comment - I made some changes to the xsd and xsl to fix the issues I was having.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : gbois
          Path:
          trunk/hudson/dtkit/dtkit-default/dtkit-default-junit/src/main/resources/com/thalesgroup/dtkit/junit/boosttest-1.0-to-junit-1.0.xsl
          trunk/hudson/dtkit/dtkit-default/dtkit-default-junit/src/main/resources/com/thalesgroup/dtkit/junit/boosttest-1.0.xsd
          http://jenkins-ci.org/commit/33638
          Log:
          Integrated xsd and xsl modifications from JENKINS-7039

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : gbois Path: trunk/hudson/dtkit/dtkit-default/dtkit-default-junit/src/main/resources/com/thalesgroup/dtkit/junit/boosttest-1.0-to-junit-1.0.xsl trunk/hudson/dtkit/dtkit-default/dtkit-default-junit/src/main/resources/com/thalesgroup/dtkit/junit/boosttest-1.0.xsd http://jenkins-ci.org/commit/33638 Log: Integrated xsd and xsl modifications from JENKINS-7039
          Hide
          gbois Gregory Boissinot added a comment -

          The latest snapshot of the xUnit plugin that integrates these modifications can be found here
          http://ci.hudson-labs.org/view/Plugins/job/plugins_xunit/6/org.jvnet.hudson.plugins$xunit/

          Please could you test it?

          Show
          gbois Gregory Boissinot added a comment - The latest snapshot of the xUnit plugin that integrates these modifications can be found here http://ci.hudson-labs.org/view/Plugins/job/plugins_xunit/6/org.jvnet.hudson.plugins$xunit/ Please could you test it?
          Hide
          under2x under2x added a comment -

          Hi,

          I added the xunit.hpi you linked to hudson 1.370 and it worked great on my tests. Thanks!

          Show
          under2x under2x added a comment - Hi, I added the xunit.hpi you linked to hudson 1.370 and it worked great on my tests. Thanks!
          Hide
          gbois Gregory Boissinot added a comment -

          Thanks to you

          Show
          gbois Gregory Boissinot added a comment - Thanks to you

            People

            Assignee:
            gbois Gregory Boissinot
            Reporter:
            under2x under2x
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: