[llvm] [lit] Are all RUN lines skipped in windows cmd? (PR #65242)
Henrik G. Olsson via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 4 04:40:13 PDT 2023
================
@@ -2115,10 +2100,35 @@ def parseIntegratedTestScript(test, additional_parsers=[], require_script=True):
def _runShTest(test, litConfig, useExternalSh, script, tmpBase):
def runOnce(execdir):
+ # Set unique LLVM_PROFILE_FILE for each run command
+ if litConfig.per_test_coverage:
+ # Extract the test case name from the test object, and remove the
+ # file extension.
+ test_case_name = test.path_in_suite[-1]
+ test_case_name = test_case_name.rsplit(".", 1)[0]
+ coverage_index = 0 # Counter for coverage file index
+ scriptProf = []
+ for ln in script:
+ match = re.match(kPdbgRegex, ln)
+ if match:
+ dbg = match.group(1)
+ command = match.group(2)
+ else:
+ command = ln
+ profile = f"{test_case_name}{coverage_index}.profraw"
+ coverage_index += 1
+ command = f"export LLVM_PROFILE_FILE={profile} && {command}"
+ if match:
+ command = buildPdbgCommand(dbg, command)
----------------
hnrklssn wrote:
This looks correct to me, but it would be good to have a regression test for it.
https://github.com/llvm/llvm-project/pull/65242
More information about the llvm-commits
mailing list