[libc++][utils] Fix LIT %if substitution support (#209358)
Update the applySubstitutions call in `libcxx/utils/libcxx/test/format.py` to match the
change to `llvm/utils/lit/lit/TestRunner.py` done in 1041a9642b.
This commit is contained in:
parent
743813d100
commit
a8617034c4
2 changed files with 16 additions and 1 deletions
11
libcxx/test/selftest/if-else.sh.cpp
Normal file
11
libcxx/test/selftest/if-else.sh.cpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// Make sure that LIT `%if` substitutions are aware of the available features.
|
||||
|
||||
// RUN: not %if target={{.+}} %{ not %} echo "hello world"
|
||||
|
|
@ -205,8 +205,12 @@ def parseScript(test, preamble):
|
|||
)
|
||||
|
||||
# Perform substitutions in the script itself.
|
||||
conditions = {feature: True for feature in test.config.available_features}
|
||||
script = lit.TestRunner.applySubstitutions(
|
||||
script, substitutions, recursion_limit=test.config.recursiveExpansionLimit
|
||||
script,
|
||||
substitutions,
|
||||
conditions,
|
||||
recursion_limit=test.config.recursiveExpansionLimit,
|
||||
)
|
||||
|
||||
return script
|
||||
|
|
|
|||
Loading…
Reference in a new issue