瀏覽代碼

test: tppu: added readme

mattias 3 周之前
父節點
當前提交
70cf80323c
共有 2 個文件被更改,包括 14 次插入17 次删除
  1. 13 0
      tests/tppu/readme.txt
  2. 1 17
      tests/tppu/tcrecompile.pas

+ 13 - 0
tests/tppu/readme.txt

@@ -0,0 +1,13 @@
+Test suite for running the compiler, building ppus, running again, checking what ppus were build.
+
+How to use:
+- Compile the compiler, for example via ../../compiler/ppcx64.lpi, creating ../../compiler/x86_64/pp
+- Compile this testsuite testppu.lpi
+- Run this testsuite:
+  Set environment variable PP to the compiler and run all tests:
+    PP=../../compiler/x86_64/pp ./testppu  
+
+Or run a single test:
+
+PP=../../compiler/x86_64/pp ./testppu --suite=TestImplInline1
+

+ 1 - 17
tests/tppu/tcrecompile.pas

@@ -177,23 +177,7 @@ begin
 end;
 
 procedure TTestRecompile.GetCompiler;
-const
-  CompilerParam = '--compiler=';
-var
-  i: Integer;
-  aParam: String;
 begin
-  for i:=1 to ParamCount do
-  begin
-    aParam:=ParamStr(i);
-    if LeftStr(aParam,length(CompilerParam))=CompilerParam then
-    begin
-      PP:=copy(aParam,length(CompilerParam)+1,255);
-      CheckCompiler;
-      exit;
-    end;
-  end;
-
   PP:=GetEnvironmentVariable(String('PP'));
   if PP>'' then
   begin
@@ -201,7 +185,7 @@ begin
     exit;
   end;
 
-  raise Exception.Create('I need either environment var "PP" or cmd line param "compiler"');
+  raise Exception.Create('I need environment var "PP"');
 end;
 
 procedure TTestRecompile.CheckCompiler;