diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py index 915e387dac205..2462e006d63f6 100644 --- a/llvm/test/lit.cfg.py +++ b/llvm/test/lit.cfg.py @@ -18,7 +18,17 @@ config.name = "LLVM" # testFormat: The test format to use to interpret tests. -config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell) +extra_substitutions = extra_substitutions = ( + [ + (r"\| not FileCheck .*", "> /dev/null"), + (r"\| FileCheck .*", "> /dev/null"), + ] + if config.enable_profcheck + else [] +) +config.test_format = lit.formats.ShTest( + not llvm_config.use_lit_shell, extra_substitutions +) # suffixes: A list of file extensions to treat as test files. This is overriden # by individual lit.local.cfg files in the test subdirectories.