clibs / cmocka

An elegant unit testing framework for C with support for mock objects.
Apache License 2.0
227 stars 55 forks source link

Calling cmocka group tests repeatedly causing invalid XML files. #14

Closed rpadma2 closed 2 years ago

rpadma2 commented 5 years ago

In our testing scripts, some CMOCKA group tests are called repeatedly (sometimes like 100+ times). This is making our Jenkins job fail with some tests having invalid JUNIT (xml) files [root of XML having nested testsuites tag]. Is there a way to workaround this issue? Any information in this area is greatly appreciated. Failed XML file format:

?xml version="1.0" encoding="UTF-8" ?> testsuites> testsuite name="debug test" time="0.000" tests="1" failures="0" errors="0" skipped="0" > testcase name="EVT003: debug" time="0.000" > /testcase> /testsuite> /testsuites> testsuites> testsuite name="debug test" time="0.000" tests="1" failures="0" errors="0" skipped="0" > testcase name="EVT003: debug" time="0.000" > /testcase> /testsuite> /testsuites>

... so on