|
@@ -374,6 +374,7 @@ function RunCompiler:boolean;
|
|
var
|
|
var
|
|
outname,
|
|
outname,
|
|
args : string;
|
|
args : string;
|
|
|
|
+ execres : boolean;
|
|
begin
|
|
begin
|
|
RunCompiler:=false;
|
|
RunCompiler:=false;
|
|
OutName:=ForceExtension(PPFile,'log');
|
|
OutName:=ForceExtension(PPFile,'log');
|
|
@@ -388,9 +389,23 @@ begin
|
|
args:=args+' '+ppfile;
|
|
args:=args+' '+ppfile;
|
|
Verbose(V_Debug,'Executing '+compilerbin+' '+args);
|
|
Verbose(V_Debug,'Executing '+compilerbin+' '+args);
|
|
{ also get the output from as and ld that writes to stderr sometimes }
|
|
{ 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));
|
|
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 }
|
|
{ Check for internal error }
|
|
if ExitWithInternalError(OutName) then
|
|
if ExitWithInternalError(OutName) then
|
|
begin
|
|
begin
|
|
@@ -476,8 +491,10 @@ function RunExecutable:boolean;
|
|
var
|
|
var
|
|
outname,
|
|
outname,
|
|
TestExe : string;
|
|
TestExe : string;
|
|
|
|
+ execres : boolean;
|
|
begin
|
|
begin
|
|
RunExecutable:=false;
|
|
RunExecutable:=false;
|
|
|
|
+ execres:=true;
|
|
TestExe:=ForceExtension(PPFile,ExeExt);
|
|
TestExe:=ForceExtension(PPFile,ExeExt);
|
|
OutName:=ForceExtension(PPFile,'elg');
|
|
OutName:=ForceExtension(PPFile,'elg');
|
|
Verbose(V_Debug,'Executing '+TestExe);
|
|
Verbose(V_Debug,'Executing '+TestExe);
|
|
@@ -497,11 +514,26 @@ begin
|
|
begin
|
|
begin
|
|
{ don't redirect interactive and graph programs .. }
|
|
{ don't redirect interactive and graph programs .. }
|
|
if Config.IsInteractive or Config.UsesGraph then
|
|
if Config.IsInteractive or Config.UsesGraph then
|
|
- ExecuteRedir(TestExe,'','','','')
|
|
|
|
|
|
+ execres:=ExecuteRedir(TestExe,'','','','')
|
|
else
|
|
else
|
|
- ExecuteRedir(TestExe,'','',OutName,'');
|
|
|
|
|
|
+ execres:=ExecuteRedir(TestExe,'','',OutName,'');
|
|
end;
|
|
end;
|
|
Verbose(V_Debug,'Exitcode '+ToStr(ExecuteResult));
|
|
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
|
|
if ExecuteResult<>Config.ResultCode then
|
|
begin
|
|
begin
|
|
if (ExecuteResult<>0) and
|
|
if (ExecuteResult<>0) and
|
|
@@ -825,7 +857,10 @@ begin
|
|
end.
|
|
end.
|
|
{
|
|
{
|
|
$Log$
|
|
$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
|
|
+ Several -Y<opt> is now allowed
|
|
|
|
|
|
Revision 1.30 2004/03/21 19:15:18 florian
|
|
Revision 1.30 2004/03/21 19:15:18 florian
|