Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


Code Merge Request #13: XML testing (merged)



Something went wrong. Please, merge manually

Checking if merge is possible...

Something went wrong. Please, merge manually

Halvor Lund asked you to merge 0 commits from /u/halvorlu/pfunit/ to development, 2014-08-07

I have written a test to verify that the XmlPrinter outputs XML that follows the JUnit standard, using the xmllint tool from libxml.
Other changes:
- The test driver now returns an error code if any tests fail, useful for e.g. continuous integration testing with Hudson/Jenkins
- The test name now includes the name of the suite as well, to make it easier to organize results in e.g. Hudson/Jenkins

Commit Date  


  • Tom Clune
    Tom Clune


    Thanks. We're in the midst of proposal-writing season here, so it may take 2 weeks to merge your changes. Please let us know if the delay will adversely impact you.

    • Tom
  • Looks good so far. I've taken a first cut at merging, testing in CMAKE with the Intel compiler. It works with minor changes. I'll continue the review next week covering other build configurations. The code calls xmllint through a shell (system), which may be a problem for Windows and maybe other systems too. We try to keep external dependencies at a minimum. Fortran 2008 has a standard for executing a shell command, but I'm not sure about the current portability of calls to "system" and xmllint.

  • Halvor Lund
    Halvor Lund

    I agree that the dependency on xmllint is not ideal. An alternative could be to use a Fortran library for XML, such as FoX, which I think can validate XML against a DTD. Another alternative could be to skip the test (or let it pass) if xmllint does not exist on the system.

  • I checked FoX, which can validate against a DTD, but not an XSD. Apparently XML validation is way beyond FoX's scope. I modified the test code to skip validation if 'xmllint' is not available. I did add logic to check the output against hard-coded text, like a regression, which is performed every time.

    • Status: open --> merged