<div dir="ltr">Hey,<br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 2, 2015 at 9:01 PM, Norbert Thiebaud <span dir="ltr"><<a href="mailto:nthiebaud@gmail.com" target="_blank">nthiebaud@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sun, Aug 2, 2015 at 11:25 AM, Markus Mohrhard<br>
<<a href="mailto:markus.mohrhard@googlemail.com">markus.mohrhard@googlemail.com</a>> wrote:<br>
<br>
<br>
>> AI:     + will have a look at the CppUnit to implement 'expected failure'<br>
>> (Jan-Marek)<br>
>>             + Cpp logs are e.g. in<br>
>> workdir/CppunitTest/sal_rtl_math.test.log<br>
><br>
><br>
><br>
> That is already possible with cppunit. Instead of using CPPUNIT_TEST use<br>
> CPPUNIT_TEST_FAIL which tells cppunit that the test is expected to fail with<br>
> a cppunit exception being thrown (it is extensively used in the cppunit<br>
> internal unit tests). The test will start to fail when none of the asserts<br>
> fail anymore. Keep in mind that it might be dangerous to use this with more<br>
> than one assertion as an unexpected one might fail.<br>
><br>
<br>
</span>That is not exactly what tha aim is...<br>
the aim is to have a failure be repport as such and not stop<br>
everything.. when a test is tagged as _can fail_ or something<br>
this is when a test is added before the fix<br></blockquote><div><br></div><div>So you want to have this as non-fatal tests. Ok, that is currently missing from cppunit but at least with the CPPUNIT_TEST_FAIL you can add tests before the bugfix and just change it from CPPUNIT_TEST_FAIL to CPPUNIT_TEST when the fix has been implemented. So it is a compromise as it is already there and we can have a look how difficult it would be to properly implement non-fatal tests in cppunit.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
also the minutes claim that cppunit log exist.. it is true they do,<br>
but they are not exploitable.<br>
I would like to be able to repport at the end of the build a nice recap<br>
<br>
<module> <section> <nb_of_test> <#sucess> <#skipped> <#failed><br>
<for each failed<br>
<space><testname> : FAILED (<optionally one line reason>)<br>
<br>
the minute point to<br>
workdir/CppunitTest/sal_rtl_math.test.log<br>
which contains:<br>
OK (3)<br>
<br>
but  writerperfect_writer.test.log fro instance<br>
contain 12027 lines.. most of it random trace messages, and I could<br>
not find any way to parse (at all, even less reliably) that thing to<br>
extract any useful information.<br>
<br>
maybe it is just a matter of using<br>
<a href="http://cppunit.sourceforge.net/doc/1.8.0/class_cpp_unit_1_1_xml_outputter.html" rel="noreferrer" target="_blank">http://cppunit.sourceforge.net/doc/1.8.0/class_cpp_unit_1_1_xml_outputter.html</a><br>
and then adding a (optional) post processing step in the build to<br>
generate a nice summary....<br></blockquote><div><br><br></div><div>It is even easier. You can add another TestListener in sal/cppunittester/cppunittester.cxx that logs all failures, and executed tests. Of course as there is no support for non-fatal tests right now you can't log them. It would at least give you an information how many tests are executed. I think there is no post-processing necessary as you get all the information the the xml outputter has already in the listener and process is directly there.<br><br></div><div>Regards,<br></div><div>Markus <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
Norbert<br>
</font></span></blockquote></div><br></div></div>