fpcunit: consoletestrunner returns exitcode 1, if there are errors or failures.

git-svn-id: trunk@10567 -
This commit is contained in:
vincents 2007-02-02 09:27:41 +00:00
parent ea88e8a24f
commit fece699695
2 changed files with 4 additions and 3 deletions

View File

@ -160,7 +160,6 @@ var
WriteXMLFile(XMLResultsWriter.Document, output); WriteXMLFile(XMLResultsWriter.Document, output);
finally finally
XMLResultsWriter.Free; XMLResultsWriter.Free;
testResult.Free;
end; end;
end; end;
@ -177,7 +176,6 @@ var
PlainResultsWriter.WriteResult(testResult); PlainResultsWriter.WriteResult(testResult);
finally finally
PlainResultsWriter.Free; PlainResultsWriter.Free;
testResult.Free;
end; end;
end; end;
{$ENDIF} {$ENDIF}
@ -197,9 +195,12 @@ begin
else else
doXMLTestRun(aTest); doXMLTestRun(aTest);
end; end;
if testResult.NumberOfErrors+testResult.NumberOfFailures>0 then
ExitCode := 1;
finally finally
if ShowProgress then if ShowProgress then
progressWriter.Free; progressWriter.Free;
testResult.Free;
end; end;
end; end;

View File

@ -23,7 +23,7 @@ unit BugTestCase;
interface interface
uses uses
Classes, SysUtils, Math, process, fileutil, fpcunit, testutils, testregistry, Classes, SysUtils, Math, process, fileutil, fpcunit, testregistry,
TestGlobals; TestGlobals;
type type