![]() This syntax allows to modify RUN lines based on features available. For example: RUN: ... | FileCheck %s --check-prefix=%if windows %{CHECK-W%} %else %{CHECK-NON-W%} CHECK-W: ... CHECK-NON-W: ... The whole command can be put under %if ... %else: RUN: %if tool_available %{ %tool %} %else %{ true %} or: RUN: %if tool_available %{ %tool %} If tool_available feature is missing, we'll have an empty command in this RUN line. LIT used to emit an error for empty commands, but now it treats such commands as nop in all cases. Multi-line expressions are also supported: RUN: %if tool_available %{ \ RUN: %tool \ RUN: %} %else %{ \ RUN: true \ RUN: %} Background and motivation: D121727 [NVPTX] Integrate ptxas to LIT tests https://reviews.llvm.org/D121727 Differential Revision: https://reviews.llvm.org/D122569 |
||
---|---|---|
.. | ||
allow-retries | ||
config-map-discovery | ||
custom-result-category | ||
discovery | ||
exec-discovery | ||
exec-discovery-in-tree | ||
fake-externals | ||
googletest-cmd-wrapper | ||
googletest-crash | ||
googletest-discovery-failed | ||
googletest-format | ||
googletest-timeout | ||
ignore-fail | ||
lit-opts | ||
lld-features | ||
max-failures | ||
max-time | ||
parallelism-groups | ||
progress-bar | ||
py-config-discovery | ||
reorder | ||
show-result-codes | ||
show-used-features | ||
shtest-env | ||
shtest-format | ||
shtest-format-argv0 | ||
shtest-if-else | ||
shtest-inject | ||
shtest-keyword-parse-errors | ||
shtest-not | ||
shtest-output-printing | ||
shtest-recursive-substitution | ||
shtest-run-at-line | ||
shtest-shell | ||
shtest-timeout | ||
standalone-tests | ||
standalone-tests-with-excludes | ||
standalone-tests-with-suffixes | ||
test-data | ||
test-data-micro | ||
test_retry_attempts | ||
testrunner-custom-parsers | ||
unittest-adaptor | ||
unparsed-requirements | ||
use-llvm-tool | ||
use-llvm-tool-required | ||
xfail-cl | ||
xunit-output | ||
lit.cfg |