l3build로 테스트 파일을 확인하기 위해 여러 실행/컴파일을 실행하는 방법은 무엇입니까?

l3build로 테스트 파일을 확인하기 위해 여러 실행/컴파일을 실행하는 방법은 무엇입니까?

l3build내가 가지고 있는 일부 LaTeX 코드에 대해 회귀 테스트를 수행하는 데 사용하고 싶습니다 . 이러한 회귀 테스트를 수행하기 위해 여러 컴파일이 필요할 때 어려움이 시작됩니다. 예를 들어, 목차가 내 테스트 문서의 섹션을 올바르게 인쇄하고 있는지 확인하고 싶습니다.

수동으로 수행하면 첫 번째 컴파일에서는 목차가 누락되고 두 번째 컴파일에서는 모든 것이 정상입니다. 하지만 이렇게 하면 l3build두 번째로 컴파일할 수 없습니다.

문서에서 이것이 runtest_tasks옵션이 될 수 있다는 것을 알았습니다. 하지만 제 경우에는 제대로 작동하지 않는 것 같습니다. 제가 뭔가를 놓친 것 같은데, 사례를 찾지 못해서 이 작은 것을 찾기가 어렵습니다.

MWE는 다음과 같습니다: build.lua:

checksearch = true -- Enable command printing during check phase

-- Function to check if a file name matches a certain pattern
local function match_pattern(filename, pattern)
  return true
  -- string.match(filename, pattern) ~=nil
end

-- Define the runtest_tasks function
runtest_tasks = function(name, run)
  if run == 1 then
    print("Debug: name =", name, "run =", run, current_engine )
    -- Run additional tasks for files matching a specific pattern
    if match_pattern(name, "mytest") then
      print("")
      print("Executing additional tasks for files matching the pattern.")
      print("tex(name)")
      -- Add your specific tasks here
      errorlevel = tex(name..'.lvt') -- second compilation
      print("Executing additional tasks DONE")
      return "echo "..errorlevel -- I get 256, and no table of content printed
    else
      return "echo "..0
    end
  else
    return "echo "..0
  end
end

그리고 mytest.lvt

\input regression-test.tex\relax

\documentclass{article}

\begin{document}
\START
\showoutput


\TEST{toc section}{

\tableofcontents
\newpage

\section{test}

}
\END 

\vfil\break
\end{document}

l3build그렇다면 여러 실행/컴파일이 필요한 회귀 테스트를 수행하는 방법은 무엇입니까 ?

답변1

@Ulrike Fischer의 의견을 답변으로 바꾸고 있습니다.

checkruns=3해당 목적에 사용할 수 있는 옵션이 있습니다 . 또한 여러 검사 실행이 일부 파일에만 관련된 경우 다른 폴더로 분리하고 옵션을 사용하여 checkconfigs={<file>}해당 폴더(및 파일)와 관련된 특정 설정 구성 파일을 가리킬 수 있습니다.

관련 정보