mirror of https://gitlab.com/basile.b/dexed.git
runnables, unittests, prokect runner: display an error when exit code is not null
This commit is contained in:
parent
2131e51016
commit
e2af8f7ce3
|
@ -1660,6 +1660,9 @@ begin
|
||||||
inph := EntitiesConnector.getSingleService('ICEProcInputHandler');
|
inph := EntitiesConnector.getSingleService('ICEProcInputHandler');
|
||||||
if (inph <> nil) then
|
if (inph <> nil) then
|
||||||
(inph as ICEProcInputHandler).removeProcess(proc);
|
(inph as ICEProcInputHandler).removeProcess(proc);
|
||||||
|
if (proc.ExitStatus <> 0) then
|
||||||
|
fMsgs.message(format('error: the process (%s) has returned the signal %d',
|
||||||
|
[proc.Executable, proc.ExitStatus]), fDoc, amcEdit, amkErr);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.actSetRunnableSwExecute(Sender: TObject);
|
procedure TCEMainForm.actSetRunnableSwExecute(Sender: TObject);
|
||||||
|
|
|
@ -795,6 +795,7 @@ var
|
||||||
lst: TStringList;
|
lst: TStringList;
|
||||||
str: string;
|
str: string;
|
||||||
msgs: ICEMessagesDisplay;
|
msgs: ICEMessagesDisplay;
|
||||||
|
proc : TProcess;
|
||||||
begin
|
begin
|
||||||
lst := TStringList.Create;
|
lst := TStringList.Create;
|
||||||
msgs := getMessageDisplay;
|
msgs := getMessageDisplay;
|
||||||
|
@ -809,10 +810,15 @@ begin
|
||||||
lst.Free;
|
lst.Free;
|
||||||
end;
|
end;
|
||||||
//
|
//
|
||||||
if not TProcess(sender).Active then
|
proc := TProcess(sender);
|
||||||
|
if not proc.Running then
|
||||||
begin
|
begin
|
||||||
getprocInputHandler.removeProcess(TProcess(sender));
|
getprocInputHandler.removeProcess(TProcess(sender));
|
||||||
ChDir(fRunnerOldCwd);
|
ChDir(fRunnerOldCwd);
|
||||||
|
//
|
||||||
|
if (proc.ExitStatus <> 0) then
|
||||||
|
msgs.message(format('error: the process (%s) has returned the signal %d',
|
||||||
|
[proc.Executable, proc.ExitStatus]), self as ICECommonProject, amcProj, amkErr);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,6 @@ var
|
||||||
begin
|
begin
|
||||||
if not (poUsePipes in Options) then
|
if not (poUsePipes in Options) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
sum := fOutputStack.Size;
|
sum := fOutputStack.Size;
|
||||||
while (Output <> nil) and (NumBytesAvailable > 0) do
|
while (Output <> nil) and (NumBytesAvailable > 0) do
|
||||||
begin
|
begin
|
||||||
|
@ -112,7 +111,6 @@ begin
|
||||||
cnt := Output.Read((fOutputStack.Memory + sum)^, 1024);
|
cnt := Output.Read((fOutputStack.Memory + sum)^, 1024);
|
||||||
sum += cnt;
|
sum += cnt;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
fOutputStack.SetSize(sum);
|
fOutputStack.SetSize(sum);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -123,18 +121,9 @@ var
|
||||||
toread: Integer;
|
toread: Integer;
|
||||||
buff: Byte = 0;
|
buff: Byte = 0;
|
||||||
str: TMemoryStream;
|
str: TMemoryStream;
|
||||||
err: array[0..255] of Byte;
|
|
||||||
begin
|
begin
|
||||||
if not Running then
|
if not Running then
|
||||||
begin
|
begin
|
||||||
//TODO-cbugfix: errors not displayed when a runnable crashes
|
|
||||||
//if poStderrToOutPut in Options then
|
|
||||||
//if Stderr <> nil then while (true) do
|
|
||||||
//begin
|
|
||||||
// toread := Stderr.Read(err[0], length(err));
|
|
||||||
// if toread = 0 then break;
|
|
||||||
// fOutputStack.Write(err[0], toread);
|
|
||||||
//end;
|
|
||||||
list.LoadFromStream(fOutputStack);
|
list.LoadFromStream(fOutputStack);
|
||||||
if consume then
|
if consume then
|
||||||
fOutputStack.Clear;
|
fOutputStack.Clear;
|
||||||
|
|
Loading…
Reference in New Issue