mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 21:19:31 +02:00
* test result of execution and report as failure with iostatus displayed
This commit is contained in:
parent
f3e9309eef
commit
f68712cc86
@ -374,6 +374,7 @@ function RunCompiler:boolean;
|
||||
var
|
||||
outname,
|
||||
args : string;
|
||||
execres : boolean;
|
||||
begin
|
||||
RunCompiler:=false;
|
||||
OutName:=ForceExtension(PPFile,'log');
|
||||
@ -388,9 +389,23 @@ begin
|
||||
args:=args+' '+ppfile;
|
||||
Verbose(V_Debug,'Executing '+compilerbin+' '+args);
|
||||
{ also get the output from as and ld that writes to stderr sometimes }
|
||||
ExecuteRedir(CompilerBin,args,'',OutName,OutName);
|
||||
execres:=ExecuteRedir(CompilerBin,args,'',OutName,OutName);
|
||||
Verbose(V_Debug,'Exitcode '+ToStr(ExecuteResult));
|
||||
|
||||
{ Error during execution? }
|
||||
if (not execres) and (ExecuteResult=0) then
|
||||
begin
|
||||
AddLog(FailLogFile,TestName);
|
||||
AddLog(ResLogFile,failed_to_execute_compiler+PPFileInfo);
|
||||
AddLog(LongLogFile,line_separation);
|
||||
AddLog(LongLogFile,failed_to_execute_compiler+PPFileInfo);
|
||||
CopyFile(OutName,LongLogFile,true);
|
||||
{ avoid to try again }
|
||||
AddLog(ForceExtension(PPFile,'elg'),failed_to_execute_compiler+PPFileInfo);
|
||||
Verbose(V_Abort,'IOStatus: '+ToStr(IOStatus));
|
||||
exit;
|
||||
end;
|
||||
|
||||
{ Check for internal error }
|
||||
if ExitWithInternalError(OutName) then
|
||||
begin
|
||||
@ -476,8 +491,10 @@ function RunExecutable:boolean;
|
||||
var
|
||||
outname,
|
||||
TestExe : string;
|
||||
execres : boolean;
|
||||
begin
|
||||
RunExecutable:=false;
|
||||
execres:=true;
|
||||
TestExe:=ForceExtension(PPFile,ExeExt);
|
||||
OutName:=ForceExtension(PPFile,'elg');
|
||||
Verbose(V_Debug,'Executing '+TestExe);
|
||||
@ -497,11 +514,26 @@ begin
|
||||
begin
|
||||
{ don't redirect interactive and graph programs .. }
|
||||
if Config.IsInteractive or Config.UsesGraph then
|
||||
ExecuteRedir(TestExe,'','','','')
|
||||
execres:=ExecuteRedir(TestExe,'','','','')
|
||||
else
|
||||
ExecuteRedir(TestExe,'','',OutName,'');
|
||||
execres:=ExecuteRedir(TestExe,'','',OutName,'');
|
||||
end;
|
||||
Verbose(V_Debug,'Exitcode '+ToStr(ExecuteResult));
|
||||
|
||||
{ Error during execution? }
|
||||
if (not execres) and (ExecuteResult=0) then
|
||||
begin
|
||||
AddLog(FailLogFile,TestName);
|
||||
AddLog(ResLogFile,failed_to_execute_test+PPFileInfo);
|
||||
AddLog(LongLogFile,line_separation);
|
||||
AddLog(LongLogFile,failed_to_execute_test+PPFileInfo);
|
||||
CopyFile(OutName,LongLogFile,true);
|
||||
{ avoid to try again }
|
||||
AddLog(ForceExtension(PPFile,'elg'),failed_to_execute_test+PPFileInfo);
|
||||
Verbose(V_Abort,'IOStatus: '+ToStr(IOStatus));
|
||||
exit;
|
||||
end;
|
||||
|
||||
if ExecuteResult<>Config.ResultCode then
|
||||
begin
|
||||
if (ExecuteResult<>0) and
|
||||
@ -825,7 +857,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.31 2004-04-01 12:51:32 olle
|
||||
Revision 1.32 2004-04-29 21:41:44 peter
|
||||
* test result of execution and report as failure with iostatus displayed
|
||||
|
||||
Revision 1.31 2004/04/01 12:51:32 olle
|
||||
+ Several -Y<opt> is now allowed
|
||||
|
||||
Revision 1.30 2004/03/21 19:15:18 florian
|
||||
|
@ -27,6 +27,8 @@ const
|
||||
successfully_compiled = 'Successfully compiled ';
|
||||
failed_to_run = 'Failed to run ';
|
||||
successfully_run = 'Successfully run ';
|
||||
failed_to_execute_compiler = 'Failed to execute compiler ';
|
||||
failed_to_execute_test = 'Failed to execute test ';
|
||||
skipping_graph_test = 'Skipping test because it uses graph ';
|
||||
skipping_interactive_test = 'Skipping test because it is interactive ';
|
||||
skipping_known_bug = 'Skipping test because it is a known bug ';
|
||||
@ -47,7 +49,10 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.5 2003-10-13 14:19:02 peter
|
||||
Revision 1.6 2004-04-29 21:41:44 peter
|
||||
* test result of execution and report as failure with iostatus displayed
|
||||
|
||||
Revision 1.5 2003/10/13 14:19:02 peter
|
||||
* digest updated for max version limit
|
||||
|
||||
Revision 1.4 2002/12/24 21:47:49 peter
|
||||
|
Loading…
Reference in New Issue
Block a user