trident-job / delphi-code-coverage

Automatically exported from code.google.com/p/delphi-code-coverage
0 stars 0 forks source link

Propagate the exit code of the test executable to the CodeCoverage.exe exit code (option) #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run CodeCoverage.exe with a DUnit console mode test executable that is 
failing (on purpose). For example:
> CodeCoverage.exe -e UnitTester.exe -u TestedUnit -xml
2.Collect the exit code of CodeCoverage.exe

What is the expected output? What do you see instead?
I would hope to see the UnitTester.exe exit code (when nonzero) reflected in 
the exit code of CodeCoverage.exe
But instead I now see always exit code 0 because CodeCoverage.exe runs ok.

What version of the product are you using? On what operating system?
1.0_RC8 on Windows 7 x64

Please provide any additional information below.
For backward compatability reasons I suppose such a behaviour would have to be 
made subject to a non-default option (new switch). But it sure would be useful. 
In a build server like Jenkins, the successful execution of the unit test has 
to be registered via the exit code. Otherwise we have to run the test twice, 
once with CodeCoverage (to measure the coverage) and one without (to measure 
the functionality). But then you are not guaranteed that the two run the same 
way and that the measured coverage is influenced by random errors that you do 
not see the 2nd time.

Original issue reported on code.google.com by kristo...@xs4all.nl on 6 Sep 2013 at 9:54

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r176.

Original comment by e.kotlya...@gmail.com on 27 Dec 2013 at 11:43

GoogleCodeExporter commented 9 years ago
I've added new switch -tec, if it is specified then test exe exit code will be 
returned from codecoverage.exe

Original comment by e.kotlya...@gmail.com on 27 Dec 2013 at 11:44

GoogleCodeExporter commented 9 years ago
hi E.Kotlya ... (sorry cannot see your full name) ... thanks for adding this 
fix! 
Is there any way you could send me a test build? I've tried rebuilding the 
latest source snapshot under Delphi XE2, but I seem to be having issues with 
compiling/linking JCL ... 
Are there other short-term fixes in the pipeline, or is there a chance that 
this fix could justify a new formal release (RC09) of the DelphiCodeCoverage?

thanks & best regards, 
Kristofer

Original comment by kristo...@xs4all.nl on 6 Jan 2014 at 12:26

GoogleCodeExporter commented 9 years ago
I have now been able to test the -tec switch with release 1.0RC10, works fine!
Thank-you very much.
However the new -tec switch is not included in the documentation on the Wiki 
main page!

Original comment by kristo...@xs4all.nl on 26 Nov 2014 at 4:01