Browse Source

* better error message in case of illegal test runner directive

florian 6 months ago
parent
commit
a3f4786b1d
1 changed files with 5 additions and 5 deletions
  1. 5 5
      tests/utils/tsutils.pp

+ 5 - 5
tests/utils/tsutils.pp

@@ -360,9 +360,9 @@ function GetConfig(const logprefix,fn:string;out aConfig:TConfig):boolean;
              aConfig.ConfigFileSrc:=Trim(Copy(aValue,1,l-1));
              aConfig.ConfigFileSrc:=Trim(Copy(aValue,1,l-1));
              aConfig.ConfigFileDst:=Trim(Copy(aValue,l+1,Length(aValue)-l+1));
              aConfig.ConfigFileDst:=Trim(Copy(aValue,l+1,Length(aValue)-l+1));
              if aConfig.ConfigFileSrc='' then
              if aConfig.ConfigFileSrc='' then
-               Verbose(V_Error,LogPrefix+'Config file source is empty');
+               Verbose(V_Error,LogPrefix+' File '+fn+' Config file source is empty');
              if aConfig.ConfigFileDst='' then
              if aConfig.ConfigFileDst='' then
-               Verbose(V_Error,LogPrefix+'Config file destination is empty');
+               Verbose(V_Error,LogPrefix+' File '+fn+' Config file destination is empty');
            end
            end
          else
          else
            begin
            begin
@@ -377,18 +377,18 @@ function GetConfig(const logprefix,fn:string;out aConfig:TConfig):boolean;
              begin
              begin
                val(Copy(aValue,1,p-1),l,code);
                val(Copy(aValue,1,p-1),l,code);
                if code<>0 then
                if code<>0 then
-                 Verbose(V_Error,LogPrefix+'Invalid value in EXPECTMSGS list: '+Copy(aValue,1,p-1));
+                 Verbose(V_Error,LogPrefix+' File '+fn+' nvalid value in EXPECTMSGS list: '+Copy(aValue,1,p-1));
                Insert(l,aConfig.ExpectMsgs,Length(aConfig.ExpectMsgs));
                Insert(l,aConfig.ExpectMsgs,Length(aConfig.ExpectMsgs));
                Delete(aValue,1,p);
                Delete(aValue,1,p);
                p:=Pos(',',aValue);
                p:=Pos(',',aValue);
              end;
              end;
            Val(aValue,l,code);
            Val(aValue,l,code);
            if code<>0 then
            if code<>0 then
-             Verbose(V_Error,LogPrefix+'Invalid value in EXPECTMSGS list: '+aValue);
+             Verbose(V_Error,LogPrefix+' File '+fn+' Invalid value in EXPECTMSGS list: '+aValue);
            Insert(l,aConfig.ExpectMsgs,Length(aConfig.ExpectMsgs));
            Insert(l,aConfig.ExpectMsgs,Length(aConfig.ExpectMsgs));
          end;
          end;
        else
        else
-         Verbose(V_Error,LogPrefix+'Unknown entry: '+aEntry+' with value: '+aValue);
+         Verbose(V_Error,LogPrefix+' File '+fn+' Unknown entry: '+aEntry+' with value: '+aValue);
     end;
     end;
   end;
   end;