File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -433,9 +433,29 @@ function ResolveDependency(const ADep: TDependency): string;
433433end ;
434434
435435// ---------------------------------------------------------------------------
436- // Determine whether an .lpi project is a test runner
436+ // Project classification helpers
437437// ---------------------------------------------------------------------------
438438
439+ // A project is considered GUI if its .lpi lists LCL as a required package.
440+ // GUI projects cannot run headless in CI, so we skip them entirely.
441+ function IsGUIProject (const ALpiPath: string): Boolean;
442+ var
443+ Content: string;
444+ Filter: TRegExpr;
445+ begin
446+ Result := False;
447+ if not FileExists(ALpiPath) then
448+ Exit;
449+ Content := ReadFileToString(ALpiPath);
450+ Filter := TRegExpr.Create(' <PackageName\s+Value="LCL"\s*/>' );
451+ try
452+ Result := Filter.Exec(Content);
453+ finally
454+ Filter.Free;
455+ end ;
456+ end ;
457+
458+ // A console project is a test runner if its .lpr uses consoletestrunner.
439459function IsTestProject (const ALpiPath: string): Boolean;
440460var
441461 LprPath, Content: string;
@@ -478,10 +498,18 @@ procedure BuildAllProjects;
478498 List := FindAllFilesList(Target, ' *.lpi' );
479499 try
480500 for Each in List do
501+ begin
502+ if IsGUIProject(Each) then
503+ begin
504+ Log(CSI_Yellow, ' skip GUI project ' + Each);
505+ Continue;
506+ end ;
507+
481508 if IsTestProject(Each) then
482509 RunTestProject(Each)
483510 else
484511 RunSampleProject(Each);
512+ end ;
485513 finally
486514 List.Free;
487515 end ;
You can’t perform that action at this time.
0 commit comments