Przeglądaj źródła

+ Skip library tests for go32v2 target

git-svn-id: trunk@17817 -
pierre 14 lat temu
rodzic
commit
405655ba60
1 zmienionych plików z 28 dodań i 1 usunięć
  1. 28 1
      tests/utils/dotest.pp

+ 28 - 1
tests/utils/dotest.pp

@@ -95,6 +95,7 @@ const
   rquote : char = '''';
   rquote : char = '''';
   UseTimeout : boolean = false;
   UseTimeout : boolean = false;
   emulatorname : string = '';
   emulatorname : string = '';
+  TargetCanCompileLibraries : boolean = true;
 
 
 { Constants used in IsAbsolute function }
 { Constants used in IsAbsolute function }
   TargetHasDosStyleDirectories : boolean = false;
   TargetHasDosStyleDirectories : boolean = false;
@@ -579,6 +580,19 @@ begin
     ExeExt:='.exe';
     ExeExt:='.exe';
 end;
 end;
 
 
+procedure SetTargetCanCompileLibraries;
+var
+  LTarget : string;
+  res : boolean;
+begin
+  { Call this first to ensure that CompilerTarget is not empty }
+  res:=GetCompilerTarget;
+  LTarget := lowercase(CompilerTarget);
+  { Feel free to add other targets here }
+  if (LTarget='go32v2') then
+    TargetCanCompileLibraries:=false;
+end;
+
 
 
 function OutputFileName(Const s,ext:String):String;
 function OutputFileName(Const s,ext:String):String;
 begin
 begin
@@ -1437,7 +1451,7 @@ begin
    begin
    begin
      if Config.SkipTarget<>'' then
      if Config.SkipTarget<>'' then
       begin
       begin
-        Verbose(V_Debug,'Skip compiler target: '+Config.NeedTarget);
+        Verbose(V_Debug,'Skip compiler target: '+Config.SkipTarget);
         if IsInList(CompilerTarget,Config.SkipTarget) then
         if IsInList(CompilerTarget,Config.SkipTarget) then
          begin
          begin
            { avoid a second attempt by writing to elg file }
            { avoid a second attempt by writing to elg file }
@@ -1449,6 +1463,18 @@ begin
       end;
       end;
    end;
    end;
 
 
+  if Res then
+   begin
+     { Use known bug, to avoid adding a new entry for this PM 2011-06-24 }
+     if Config.NeedLibrary and not TargetCanCompileLibraries then
+      begin
+        AddLog(EXELogFile,skipping_known_bug+PPFileInfo[current]);
+        AddLog(ResLogFile,skipping_known_bug+PPFileInfo[current]);
+        Verbose(V_Warning,'Compiler target "'+CompilerTarget+'" does not support library compilation');
+        Res:=false;
+      end;
+   end;
+
   if Res then
   if Res then
    begin
    begin
      Res:=RunCompiler;
      Res:=RunCompiler;
@@ -1500,6 +1526,7 @@ begin
   PPFileInfo.Capacity:=10;
   PPFileInfo.Capacity:=10;
   GetArgs;
   GetArgs;
   SetTargetDirectoriesStyle;
   SetTargetDirectoriesStyle;
+  SetTargetCanCompileLibraries;
   Verbose(V_Debug,'Found '+ToStr(PPFile.Count)+' tests to run');
   Verbose(V_Debug,'Found '+ToStr(PPFile.Count)+' tests to run');
   if current>0 then
   if current>0 then
     for current:=0 to PPFile.Count-1 do
     for current:=0 to PPFile.Count-1 do