[libcxx-commits] [libcxx] 08776de - [libc++/libc++abi] Properly delimit lit substitutions
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 27 07:27:48 PDT 2020
Author: Louis Dionne
Date: 2020-03-27T10:27:38-04:00
New Revision: 08776defa583676ac5c19451c6fb4fc184ee16ab
URL: https://github.com/llvm/llvm-project/commit/08776defa583676ac5c19451c6fb4fc184ee16ab
DIFF: https://github.com/llvm/llvm-project/commit/08776defa583676ac5c19451c6fb4fc184ee16ab.diff
LOG: [libc++/libc++abi] Properly delimit lit substitutions
lit is not very clever when it performs substitution on RUN lines. It
simply looks for a match anywhere in the line (without tokenization)
and replaces it by the expansion. This means that a RUN line containing
e.g. `-verify-ignore-unexpected=note` wouod be expanded to
`-verify-ignore-unexpected=<substitution for not>e`, which is
surprising and nonsensical.
It also means that something like `%compile_module` could be expanded
to `<substitution-for-%compile>_module` or to the correct substitution,
depending on the order in which substitutions are evaluated by lit.
To avoid such problems, it is a good habit to delimit custom substitutions
with some token. This commit does that for all substitutions used in the
libc++ and libc++abi test suites.
Added:
Modified:
libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp
libcxx/test/libcxx/containers/sequences/vector/exception_safety_exceptions_disabled.sh.cpp
libcxx/test/libcxx/depr/depr.c.headers/math_h.sh.cpp
libcxx/test/libcxx/double_include.sh.cpp
libcxx/test/libcxx/experimental/language.support/support.coroutines/dialect_support.sh.cpp
libcxx/test/libcxx/experimental/language.support/support.coroutines/version.sh.cpp
libcxx/test/libcxx/include_as_c.sh.cpp
libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.sh.cpp
libcxx/test/libcxx/input.output/filesystems/convert_file_time.sh.cpp
libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp
libcxx/test/libcxx/min_max_macros.sh.cpp
libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp
libcxx/test/libcxx/modules/clocale_exports.sh.cpp
libcxx/test/libcxx/modules/cstdint_exports.sh.cpp
libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp
libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp
libcxx/test/libcxx/modules/stds_include.sh.cpp
libcxx/test/libcxx/no_assert_include.sh.cpp
libcxx/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp
libcxx/test/libcxx/selftest/exec.sh.cpp
libcxx/test/libcxx/selftest/not_test.sh.cpp
libcxx/test/libcxx/selftest/test.sh.cpp
libcxx/test/libcxx/strings/basic.string/PR42676.sh.cpp
libcxx/test/libcxx/utilities/function.objects/abi_bug_cxx03_cxx11_example.sh.cpp
libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_is_same.sh.cpp
libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_metafunctions.sh.cpp
libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp
libcxx/test/pretty_printers/gdb_pretty_printer_test.sh.cpp
libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp
libcxx/test/std/depr/depr.c.headers/stdint_h.sh.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp
libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp
libcxx/utils/libcxx/test/config.py
libcxxabi/test/incomplete_type.sh.cpp
libcxxabi/test/native/arm-linux-eabi/ttype-encoding-00.pass.sh.s
libcxxabi/test/native/arm-linux-eabi/ttype-encoding-90.pass.sh.s
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp b/libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp
index 16badab8490a..48f79238c2af 100644
--- a/libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp
+++ b/libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp
@@ -8,8 +8,8 @@
//
// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03
// REQUIRES: libatomic
-// RUN: %build -latomic
-// RUN: %run
+// RUN: %{build} -latomic
+// RUN: %{run}
//
// GCC currently fails because it needs -fabi-version=6 to fix mangling of
// std::atomic when used with __attribute__((vector(X))).
diff --git a/libcxx/test/libcxx/containers/sequences/vector/exception_safety_exceptions_disabled.sh.cpp b/libcxx/test/libcxx/containers/sequences/vector/exception_safety_exceptions_disabled.sh.cpp
index 1e9cbde0114b..8f817de3cfab 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/exception_safety_exceptions_disabled.sh.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/exception_safety_exceptions_disabled.sh.cpp
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// RUN: %build -fno-exceptions
-// RUN: %run
+// RUN: %{build} -fno-exceptions
+// RUN: %{run}
// UNSUPPORTED: c++98, c++03
diff --git a/libcxx/test/libcxx/depr/depr.c.headers/math_h.sh.cpp b/libcxx/test/libcxx/depr/depr.c.headers/math_h.sh.cpp
index 8e0fad78db6b..a7ae41aaa2ba 100644
--- a/libcxx/test/libcxx/depr/depr.c.headers/math_h.sh.cpp
+++ b/libcxx/test/libcxx/depr/depr.c.headers/math_h.sh.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// RUN: %compile -fsyntax-only
+// RUN: %{compile} -fsyntax-only
#ifdef _MSC_VER
diff --git a/libcxx/test/libcxx/double_include.sh.cpp b/libcxx/test/libcxx/double_include.sh.cpp
index 42f6376142f2..b2d475c18aec 100644
--- a/libcxx/test/libcxx/double_include.sh.cpp
+++ b/libcxx/test/libcxx/double_include.sh.cpp
@@ -9,10 +9,10 @@
// Test that we can include each header in two TU's and link them together.
-// RUN: %cxx -c %s -o %t.first.o %flags %compile_flags
-// RUN: %cxx -c %s -o %t.second.o -DWITH_MAIN %flags %compile_flags
-// RUN: %cxx -o %t.exe %t.first.o %t.second.o %flags %link_flags
-// RUN: %run
+// RUN: %{cxx} -c %s -o %t.first.o %{flags} %{compile_flags}
+// RUN: %{cxx} -c %s -o %t.second.o -DWITH_MAIN %{flags} %{compile_flags}
+// RUN: %{cxx} -o %t.exe %t.first.o %t.second.o %{flags} %{link_flags}
+// RUN: %{run}
// Prevent <ext/hash_map> from generating deprecated warnings for this test.
#if defined(__DEPRECATED)
diff --git a/libcxx/test/libcxx/experimental/language.support/support.coroutines/dialect_support.sh.cpp b/libcxx/test/libcxx/experimental/language.support/support.coroutines/dialect_support.sh.cpp
index 237fbc4bbd61..1f49a4ac9207 100644
--- a/libcxx/test/libcxx/experimental/language.support/support.coroutines/dialect_support.sh.cpp
+++ b/libcxx/test/libcxx/experimental/language.support/support.coroutines/dialect_support.sh.cpp
@@ -9,8 +9,8 @@
// REQUIRES: fcoroutines-ts
-// RUN: %build -fcoroutines-ts
-// RUN: %run
+// RUN: %{build} -fcoroutines-ts
+// RUN: %{run}
// A simple "breathing" test that checks that <experimental/coroutine>
// can be parsed and used in all dialects, including C++03 in order to match
diff --git a/libcxx/test/libcxx/experimental/language.support/support.coroutines/version.sh.cpp b/libcxx/test/libcxx/experimental/language.support/support.coroutines/version.sh.cpp
index b11ea931f921..e1384b2c36c0 100644
--- a/libcxx/test/libcxx/experimental/language.support/support.coroutines/version.sh.cpp
+++ b/libcxx/test/libcxx/experimental/language.support/support.coroutines/version.sh.cpp
@@ -10,8 +10,8 @@
// UNSUPPORTED: c++98, c++03, c++11
// REQUIRES: fcoroutines-ts
-// RUN: %build -fcoroutines-ts
-// RUN: %run
+// RUN: %{build} -fcoroutines-ts
+// RUN: %{run}
#include <experimental/coroutine>
diff --git a/libcxx/test/libcxx/include_as_c.sh.cpp b/libcxx/test/libcxx/include_as_c.sh.cpp
index 67d5e14b3ec1..c001c63e8359 100644
--- a/libcxx/test/libcxx/include_as_c.sh.cpp
+++ b/libcxx/test/libcxx/include_as_c.sh.cpp
@@ -12,7 +12,7 @@
// NOTE: It's not common or recommended to have libc++ in the header search
// path when compiling C files, but it does happen often enough.
-// RUN: %cxx -c -xc %s -fsyntax-only %flags %compile_flags -std=c99
+// RUN: %{cxx} -c -xc %s -fsyntax-only %{flags} %{compile_flags} -std=c99
#include <complex.h>
#include <ctype.h>
diff --git a/libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.sh.cpp b/libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.sh.cpp
index 17b654e221f2..90b3a4369cfb 100644
--- a/libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.sh.cpp
+++ b/libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.sh.cpp
@@ -12,8 +12,8 @@
// class directory_entry
-// RUN: %build -I%libcxx_src_root/src/filesystem
-// RUN: %run
+// RUN: %{build} -I%{libcxx_src_root}/src/filesystem
+// RUN: %{run}
#include "filesystem_include.h"
#include <type_traits>
diff --git a/libcxx/test/libcxx/input.output/filesystems/convert_file_time.sh.cpp b/libcxx/test/libcxx/input.output/filesystems/convert_file_time.sh.cpp
index 55cd659cc4d1..083ff534a9c4 100644
--- a/libcxx/test/libcxx/input.output/filesystems/convert_file_time.sh.cpp
+++ b/libcxx/test/libcxx/input.output/filesystems/convert_file_time.sh.cpp
@@ -12,8 +12,8 @@
// typedef TrivialClock file_time_type;
-// RUN: %build -I%libcxx_src_root/src/filesystem
-// RUN: %run
+// RUN: %{build} -I%{libcxx_src_root}/src/filesystem
+// RUN: %{run}
#include <filesystem>
#include <chrono>
diff --git a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
index 970b7fcf8806..7c6692d489b4 100644
--- a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
+++ b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
@@ -39,14 +39,14 @@
// GCC doesn't support the aligned-allocation flags.
// XFAIL: gcc
-// RUN: %build -faligned-allocation -fsized-deallocation
-// RUN: %run
-// RUN: %build -faligned-allocation -fno-sized-deallocation -DNO_SIZE
-// RUN: %run
-// RUN: %build -fno-aligned-allocation -fsized-deallocation -DNO_ALIGN
-// RUN: %run
-// RUN: %build -fno-aligned-allocation -fno-sized-deallocation -DNO_ALIGN -DNO_SIZE
-// RUN: %run
+// RUN: %{build} -faligned-allocation -fsized-deallocation
+// RUN: %{run}
+// RUN: %{build} -faligned-allocation -fno-sized-deallocation -DNO_SIZE
+// RUN: %{run}
+// RUN: %{build} -fno-aligned-allocation -fsized-deallocation -DNO_ALIGN
+// RUN: %{run}
+// RUN: %{build} -fno-aligned-allocation -fno-sized-deallocation -DNO_ALIGN -DNO_SIZE
+// RUN: %{run}
#include <new>
#include <typeinfo>
diff --git a/libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp b/libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp
index bfc26df704d9..77e26bf8d69a 100644
--- a/libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp
+++ b/libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp
@@ -25,8 +25,8 @@
// XFAIL: with_system_cxx_lib=macosx10.8
// XFAIL: with_system_cxx_lib=macosx10.7
-// RUN: %build -faligned-allocation
-// RUN: %run
+// RUN: %{build} -faligned-allocation
+// RUN: %{run}
#include <new>
#include <typeinfo>
diff --git a/libcxx/test/libcxx/min_max_macros.sh.cpp b/libcxx/test/libcxx/min_max_macros.sh.cpp
index 47c8a09e991b..4e09e8ee42d1 100644
--- a/libcxx/test/libcxx/min_max_macros.sh.cpp
+++ b/libcxx/test/libcxx/min_max_macros.sh.cpp
@@ -9,7 +9,7 @@
// Test that we can include each header in two TU's and link them together.
-// RUN: %compile -fsyntax-only
+// RUN: %{compile} -fsyntax-only
// Prevent <ext/hash_map> from generating deprecated warnings for this test.
#if defined(__DEPRECATED)
diff --git a/libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp b/libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp
index 70477d97678a..135fb834030f 100644
--- a/libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp
+++ b/libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp
@@ -18,7 +18,7 @@
// Test that <cinttypes> re-exports <cstdint>
-// RUN: %build_module
+// RUN: %{build_module}
#include <cinttypes>
diff --git a/libcxx/test/libcxx/modules/clocale_exports.sh.cpp b/libcxx/test/libcxx/modules/clocale_exports.sh.cpp
index 6c4bc2675bb9..29086de4f614 100644
--- a/libcxx/test/libcxx/modules/clocale_exports.sh.cpp
+++ b/libcxx/test/libcxx/modules/clocale_exports.sh.cpp
@@ -17,7 +17,7 @@
// REQUIRES: modules-support
// UNSUPPORTED: c++98, c++03
-// RUN: %build_module
+// RUN: %{build_module}
#include <clocale>
diff --git a/libcxx/test/libcxx/modules/cstdint_exports.sh.cpp b/libcxx/test/libcxx/modules/cstdint_exports.sh.cpp
index c473245fe64f..3ac9999bef2a 100644
--- a/libcxx/test/libcxx/modules/cstdint_exports.sh.cpp
+++ b/libcxx/test/libcxx/modules/cstdint_exports.sh.cpp
@@ -18,7 +18,7 @@
// Test that <cstdint> re-exports <stdint.h>
-// RUN: %build_module
+// RUN: %{build_module}
#include <cstdint>
diff --git a/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp b/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp
index a653b0593277..828635a7f1c1 100644
--- a/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp
+++ b/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp
@@ -18,7 +18,7 @@
// Test that intypes.h re-exports stdint.h
-// RUN: %build_module
+// RUN: %{build_module}
#include <inttypes.h>
diff --git a/libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp b/libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp
index ec86ad827dd8..f38e5f470faa 100644
--- a/libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp
+++ b/libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp
@@ -14,7 +14,7 @@
// Test that int8_t and the like are exported from stdint.h not inttypes.h
-// RUN: %build_module
+// RUN: %{build_module}
#include <stdint.h>
diff --git a/libcxx/test/libcxx/modules/stds_include.sh.cpp b/libcxx/test/libcxx/modules/stds_include.sh.cpp
index 35c9eee2be87..c71fb9ab978e 100644
--- a/libcxx/test/libcxx/modules/stds_include.sh.cpp
+++ b/libcxx/test/libcxx/modules/stds_include.sh.cpp
@@ -17,13 +17,13 @@
// REQUIRES: modules-support
-// NOTE: The -std=XXX flag is present in %flags, so we overwrite it by passing it after %flags.
-// RUN: %cxx %flags %compile_flags -fmodules -fcxx-modules -fsyntax-only -std=c++98 %s
-// RUN: %cxx %flags %compile_flags -fmodules -fcxx-modules -fsyntax-only -std=c++03 %s
-// RUN: %cxx %flags %compile_flags -fmodules -fcxx-modules -fsyntax-only -std=c++11 %s
-// RUN: %cxx %flags %compile_flags -fmodules -fcxx-modules -fsyntax-only -std=c++14 %s
-// RUN: %cxx %flags %compile_flags -fmodules -fcxx-modules -fsyntax-only -std=c++17 %s
-// RUN: %cxx %flags %compile_flags -fmodules -fcxx-modules -fsyntax-only -std=c++2a %s
+// NOTE: The -std=XXX flag is present in %{flags}, so we overwrite it by passing it after %{flags}.
+// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++98 %s
+// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++03 %s
+// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++11 %s
+// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++14 %s
+// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++17 %s
+// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++2a %s
#include <vector>
diff --git a/libcxx/test/libcxx/no_assert_include.sh.cpp b/libcxx/test/libcxx/no_assert_include.sh.cpp
index 25e3477b03de..2b5f5f04ebdd 100644
--- a/libcxx/test/libcxx/no_assert_include.sh.cpp
+++ b/libcxx/test/libcxx/no_assert_include.sh.cpp
@@ -10,7 +10,7 @@
// Ensure that none of the standard C++ headers implicitly include cassert or
// assert.h (because assert() is implemented as a macro).
-// RUN: %compile -fsyntax-only
+// RUN: %{compile} -fsyntax-only
// Prevent <ext/hash_map> from generating deprecated warnings for this test.
#if defined(__DEPRECATED)
diff --git a/libcxx/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp b/libcxx/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp
index 37d09a8796f9..ffd9842c8d3a 100644
--- a/libcxx/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp
+++ b/libcxx/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp
@@ -10,8 +10,8 @@
// REQUIRES: fdelayed-template-parsing
-// RUN: %build -fdelayed-template-parsing
-// RUN: %run
+// RUN: %{build} -fdelayed-template-parsing
+// RUN: %{run}
#include <cmath>
#include <cassert>
diff --git a/libcxx/test/libcxx/selftest/exec.sh.cpp b/libcxx/test/libcxx/selftest/exec.sh.cpp
index 68868136a696..19c3d590978b 100644
--- a/libcxx/test/libcxx/selftest/exec.sh.cpp
+++ b/libcxx/test/libcxx/selftest/exec.sh.cpp
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-// RUN: %build
-// RUN: %exec %t.exe "HELLO"
+// RUN: %{build}
+// RUN: %{exec} %t.exe "HELLO"
#include <cassert>
#include <string>
diff --git a/libcxx/test/libcxx/selftest/not_test.sh.cpp b/libcxx/test/libcxx/selftest/not_test.sh.cpp
index 8dbf708f0cb1..56da5ed5ea50 100644
--- a/libcxx/test/libcxx/selftest/not_test.sh.cpp
+++ b/libcxx/test/libcxx/selftest/not_test.sh.cpp
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-// RUN: %build
-// RUN: not %run
+// RUN: %{build}
+// RUN: %{not} %{run}
int main(int, char**)
{
diff --git a/libcxx/test/libcxx/selftest/test.sh.cpp b/libcxx/test/libcxx/selftest/test.sh.cpp
index 1fc175413ab7..5c4db16d84d1 100644
--- a/libcxx/test/libcxx/selftest/test.sh.cpp
+++ b/libcxx/test/libcxx/selftest/test.sh.cpp
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-// RUN: %build
-// RUN: %run
+// RUN: %{build}
+// RUN: %{run}
int main(int, char**)
{
diff --git a/libcxx/test/libcxx/strings/basic.string/PR42676.sh.cpp b/libcxx/test/libcxx/strings/basic.string/PR42676.sh.cpp
index 703748285854..31bf81efa004 100644
--- a/libcxx/test/libcxx/strings/basic.string/PR42676.sh.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/PR42676.sh.cpp
@@ -8,8 +8,8 @@
// Regression test for PR42676.
-// RUN: %cxx %flags %s -o %t.exe %compile_flags %link_flags -D_LIBCPP_HIDE_FROM_ABI_PER_TU
-// RUN: %run
+// RUN: %{cxx} %{flags} %s -o %t.exe %{compile_flags} %{link_flags} -D_LIBCPP_HIDE_FROM_ABI_PER_TU
+// RUN: %{run}
#include <memory>
#include <string>
diff --git a/libcxx/test/libcxx/utilities/function.objects/abi_bug_cxx03_cxx11_example.sh.cpp b/libcxx/test/libcxx/utilities/function.objects/abi_bug_cxx03_cxx11_example.sh.cpp
index 2fc2f32d8a95..e367074cd4fe 100644
--- a/libcxx/test/libcxx/utilities/function.objects/abi_bug_cxx03_cxx11_example.sh.cpp
+++ b/libcxx/test/libcxx/utilities/function.objects/abi_bug_cxx03_cxx11_example.sh.cpp
@@ -13,10 +13,10 @@
// This tests is meant to demonstrate an existing ABI bug between the
// C++03 and C++11 implementations of std::function. It is not a real test.
-// RUN: %cxx -c %s -o %t.first.o %flags %compile_flags -std=c++03 -g
-// RUN: %cxx -c %s -o %t.second.o -DWITH_MAIN %flags %compile_flags -g -std=c++11
-// RUN: %cxx -o %t.exe %t.first.o %t.second.o %flags %link_flags -g
-// RUN: %run
+// RUN: %{cxx} -c %s -o %t.first.o %{flags} %{compile_flags} -std=c++03 -g
+// RUN: %{cxx} -c %s -o %t.second.o -DWITH_MAIN %{flags} %{compile_flags} -g -std=c++11
+// RUN: %{cxx} -o %t.exe %t.first.o %t.second.o %{flags} %{link_flags} -g
+// RUN: %{run}
#include <functional>
#include <cassert>
diff --git a/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_is_same.sh.cpp b/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_is_same.sh.cpp
index 72d3efaa71f2..cfd8adb52d85 100644
--- a/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_is_same.sh.cpp
+++ b/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_is_same.sh.cpp
@@ -17,8 +17,8 @@
// std::_IsSame: 689.634 ms 356 K
// std::is_same: 8,129.180 ms 560 K
//
-// RUN: %cxx %flags %compile_flags -c %s -o %S/orig.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17
-// RUN: %cxx %flags %compile_flags -c %s -o %S/new.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17 -DTEST_NEW
+// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %S/orig.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17
+// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %S/new.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17 -DTEST_NEW
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_metafunctions.sh.cpp b/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_metafunctions.sh.cpp
index 5096691d8bb6..6222d5c8d2e1 100644
--- a/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_metafunctions.sh.cpp
+++ b/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_metafunctions.sh.cpp
@@ -19,9 +19,9 @@
// __and_: 14,181.851 ms 648 M
//
-// RUN: %cxx %flags %compile_flags -c %s -o %S/new.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17
-// RUN: %cxx %flags %compile_flags -c %s -o %S/lazy.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17 -DTEST_LAZY_AND
-// RUN: %cxx %flags %compile_flags -c %s -o %S/std.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17 -DTEST_STD_AND
+// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %S/new.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17
+// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %S/lazy.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17 -DTEST_LAZY_AND
+// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %S/std.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17 -DTEST_STD_AND
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp b/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp
index 013d434f40d7..212d915c6970 100644
--- a/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp
+++ b/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp
@@ -24,13 +24,13 @@
// variant_new: 1,105 ms 828 KiB
-// RUN: %cxx %flags %compile_flags -std=c++17 -c %s \
+// RUN: %{cxx} %{flags} %{compile_flags} -std=c++17 -c %s \
// RUN: -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -g \
// RUN: -DTEST_NS=flat_impl -o %S/flat.o
-// RUN: %cxx %flags %compile_flags -std=c++17 -c %s \
+// RUN: %{cxx} %{flags} %{compile_flags} -std=c++17 -c %s \
// RUN: -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -g \
// RUN: -DTEST_NS=rec_impl -o %S/rec.o
-// RUN: %cxx %flags %compile_flags -std=c++17 -c %s \
+// RUN: %{cxx} %{flags} %{compile_flags} -std=c++17 -c %s \
// RUN: -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -g \
// RUN: -DTEST_NS=variant_impl -o %S/variant.o
diff --git a/libcxx/test/pretty_printers/gdb_pretty_printer_test.sh.cpp b/libcxx/test/pretty_printers/gdb_pretty_printer_test.sh.cpp
index 093fa4f2084e..268501fb9d99 100644
--- a/libcxx/test/pretty_printers/gdb_pretty_printer_test.sh.cpp
+++ b/libcxx/test/pretty_printers/gdb_pretty_printer_test.sh.cpp
@@ -9,9 +9,9 @@
// UNSUPPORTED: system-windows
// REQUIRES: libcxx_gdb
//
-// RUN: %cxx %flags %s -o %t.exe %compile_flags -g %link_flags
+// RUN: %{cxx} %{flags} %s -o %t.exe %{compile_flags} -g %{link_flags}
// Ensure locale-independence for unicode tests.
-// RUN: %libcxx_gdb -nx -batch -iex "set autoload off" -ex "source %libcxx_src_root/utils/gdb/libcxx/printers.py" -ex "python register_libcxx_printer_loader()" -ex "source %libcxx_src_root/test/pretty_printers/gdb_pretty_printer_test.py" %t.exe
+// RUN: %{libcxx_gdb} -nx -batch -iex "set autoload off" -ex "source %{libcxx_src_root}/utils/gdb/libcxx/printers.py" -ex "python register_libcxx_printer_loader()" -ex "source %{libcxx_src_root}/test/pretty_printers/gdb_pretty_printer_test.py" %t.exe
#include <bitset>
#include <deque>
diff --git a/libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp b/libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp
index 030fdaf39184..4bd33ce4bb32 100644
--- a/libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp
+++ b/libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// RUN: %build -O2
-// RUN: %run
+// RUN: %{build} -O2
+// RUN: %{run}
// <map>
diff --git a/libcxx/test/std/depr/depr.c.headers/stdint_h.sh.cpp b/libcxx/test/std/depr/depr.c.headers/stdint_h.sh.cpp
index bcc8a11343e4..e385669a93a3 100644
--- a/libcxx/test/std/depr/depr.c.headers/stdint_h.sh.cpp
+++ b/libcxx/test/std/depr/depr.c.headers/stdint_h.sh.cpp
@@ -12,8 +12,8 @@
// _STD_TYPES_T, stdint.h can be entered to get to macros like UINT32_MAX.
//
// REQUIRES: aix
-// RUN: %compile -c
-// RUN: %compile -c -D_XOPEN_SOURCE=700
+// RUN: %{compile} -c
+// RUN: %{compile} -c -D_XOPEN_SOURCE=700
// test <stdint.h>
//
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp
index a04ceb6ad42e..9d1423adc44b 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp
@@ -15,7 +15,7 @@
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
// REQUIRES: -faligned-allocation
-// RUN: %compile %verify -faligned-allocation
+// RUN: %{compile} %{verify} -faligned-allocation
#include <new>
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp
index e2a61591ad2b..8bd3294970e8 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp
@@ -15,7 +15,7 @@
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
// REQUIRES: -faligned-allocation
-// RUN: %compile %verify -faligned-allocation
+// RUN: %{compile} %{verify} -faligned-allocation
#include <new>
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp
index 5ad81863d4d8..aa7074054ff3 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp
@@ -15,7 +15,7 @@
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
// REQUIRES: -faligned-allocation
-// RUN: %compile %verify -faligned-allocation
+// RUN: %{compile} %{verify} -faligned-allocation
#include <new>
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp
index 53af2c764c00..11f8d4e0c8b2 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp
@@ -15,7 +15,7 @@
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
// REQUIRES: -faligned-allocation
-// RUN: %compile %verify -faligned-allocation
+// RUN: %{compile} %{verify} -faligned-allocation
#include <new>
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp
index 41739c0ccdc7..d604e8cb7e36 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp
@@ -22,8 +22,8 @@
// NOTE: Only clang-3.7 and GCC 5.1 and greater support -fsized-deallocation.
// REQUIRES: -fsized-deallocation
-// RUN: %build -fsized-deallocation
-// RUN: %run
+// RUN: %{build} -fsized-deallocation
+// RUN: %{run}
#if !defined(__cpp_sized_deallocation)
# error __cpp_sized_deallocation should be defined
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp
index a0d99c76d072..c062a221507f 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp
@@ -15,7 +15,7 @@
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
// REQUIRES: -faligned-allocation
-// RUN: %compile %verify -faligned-allocation
+// RUN: %{compile} %{verify} -faligned-allocation
#include <new>
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp
index 54b25ac5589a..8a51b0366f90 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp
@@ -15,7 +15,7 @@
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
// REQUIRES: -faligned-allocation
-// RUN: %compile %verify -faligned-allocation
+// RUN: %{compile} %{verify} -faligned-allocation
#include <new>
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp
index 3d62040cbe81..46d769b62c1a 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp
@@ -21,8 +21,8 @@
// NOTE: Only clang-3.7 and GCC 5.1 and greater support -fsized-deallocation.
// REQUIRES: -fsized-deallocation
-// RUN: %build -fsized-deallocation -O3
-// RUN: %run
+// RUN: %{build} -fsized-deallocation -O3
+// RUN: %{run}
#if !defined(__cpp_sized_deallocation)
# error __cpp_sized_deallocation should be defined
diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp
index 8afa0515920c..df02f7a2c47b 100644
--- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp
+++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp
@@ -13,13 +13,13 @@
// class condition_variable_any;
-// RUN: %build
-// RUN: %run 1
-// RUN: %run 2
-// RUN: %run 3
-// RUN: %run 4
-// RUN: %run 5
-// RUN: %run 6
+// RUN: %{build}
+// RUN: %{run} 1
+// RUN: %{run} 2
+// RUN: %{run} 3
+// RUN: %{run} 4
+// RUN: %{run} 5
+// RUN: %{run} 6
// -----------------------------------------------------------------------------
// Overview
diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index 2c103d57097d..2d0c3deadbc3 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -1044,30 +1044,30 @@ def configure_substitutions(self):
sub = self.config.substitutions
cxx_path = tool_env + pipes.quote(self.cxx.path)
# Configure compiler substitutions
- sub.append(('%cxx', cxx_path))
- sub.append(('%libcxx_src_root', self.libcxx_src_root))
+ sub.append(('%{cxx}', cxx_path))
+ sub.append(('%{libcxx_src_root}', self.libcxx_src_root))
# Configure flags substitutions
flags_str = ' '.join([pipes.quote(f) for f in self.cxx.flags])
compile_flags_str = ' '.join([pipes.quote(f) for f in self.cxx.compile_flags])
link_flags_str = ' '.join([pipes.quote(f) for f in self.cxx.link_flags])
all_flags = '%s %s %s' % (flags_str, compile_flags_str, link_flags_str)
- sub.append(('%flags', flags_str))
- sub.append(('%compile_flags', compile_flags_str))
- sub.append(('%link_flags', link_flags_str))
+ sub.append(('%{flags}', flags_str))
+ sub.append(('%{compile_flags}', compile_flags_str))
+ sub.append(('%{link_flags}', link_flags_str))
if self.cxx.isVerifySupported():
verify_str = ' ' + ' '.join(self.cxx.verify_flags) + ' '
- sub.append(('%verify', verify_str))
+ sub.append(('%{verify}', verify_str))
# Add compile and link shortcuts
compile_str = (cxx_path + ' -o %t.o %s -c ' + flags_str
+ ' ' + compile_flags_str)
build_str = cxx_path + ' -o %t.exe %s ' + all_flags
if self.cxx.use_modules:
- sub.append(('%build_module', build_str))
+ sub.append(('%{build_module}', build_str))
elif self.cxx.modules_flags is not None:
modules_str = ' '.join(self.cxx.modules_flags) + ' '
- sub.append(('%build_module', build_str + ' ' + modules_str))
- sub.append(('%compile', compile_str))
- sub.append(('%build', build_str))
+ sub.append(('%{build_module}', build_str + ' ' + modules_str))
+ sub.append(('%{compile}', compile_str))
+ sub.append(('%{build}', build_str))
# Configure exec prefix substitutions.
# Configure run env substitution.
codesign_ident = self.get_lit_conf('llvm_codesign_identity', '')
@@ -1078,14 +1078,14 @@ def configure_substitutions(self):
(pipes.quote(sys.executable), pipes.quote(run_py),
codesign_ident, env_vars)
run_str = exec_str + '%t.exe'
- sub.append(('%exec', exec_str))
- sub.append(('%run', run_str))
+ sub.append(('%{exec}', exec_str))
+ sub.append(('%{run}', run_str))
# Configure not program substitutions
not_py = os.path.join(self.libcxx_src_root, 'utils', 'not.py')
not_str = '%s %s ' % (pipes.quote(sys.executable), pipes.quote(not_py))
- sub.append(('not ', not_str))
+ sub.append(('%{not} ', not_str))
if self.get_lit_conf('libcxx_gdb'):
- sub.append(('%libcxx_gdb', self.get_lit_conf('libcxx_gdb')))
+ sub.append(('%{libcxx_gdb}', self.get_lit_conf('libcxx_gdb')))
def can_use_deployment(self):
# Check if the host is on an Apple platform using clang.
diff --git a/libcxxabi/test/incomplete_type.sh.cpp b/libcxxabi/test/incomplete_type.sh.cpp
index 5937c83a0d0d..71147241b760 100644
--- a/libcxxabi/test/incomplete_type.sh.cpp
+++ b/libcxxabi/test/incomplete_type.sh.cpp
@@ -19,9 +19,9 @@
// in the system libc++abi installation on OS X. (DYLD_LIBRARY_PATH is ignored
// for shell tests because of Apple security features).
-// RUN: %cxx %flags %compile_flags -c %s -o %t.one.o
-// RUN: %cxx %flags %compile_flags -c %s -o %t.two.o -DTU_ONE
-// RUN: %cxx %flags %t.one.o %t.two.o -lc++abi %link_flags -o %t.exe
+// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %t.one.o
+// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %t.two.o -DTU_ONE
+// RUN: %{cxx} %{flags} %t.one.o %t.two.o -lc++abi %{link_flags} -o %t.exe
// RUN: %t.exe
#include <stdio.h>
diff --git a/libcxxabi/test/native/arm-linux-eabi/ttype-encoding-00.pass.sh.s b/libcxxabi/test/native/arm-linux-eabi/ttype-encoding-00.pass.sh.s
index 0484e9fac2bd..49166dad846c 100644
--- a/libcxxabi/test/native/arm-linux-eabi/ttype-encoding-00.pass.sh.s
+++ b/libcxxabi/test/native/arm-linux-eabi/ttype-encoding-00.pass.sh.s
@@ -1,4 +1,4 @@
-@ RUN: %cxx %flags %link_flags %s -o %t.exe
+@ RUN: %{cxx} %{flags} %{link_flags} %s -o %t.exe
@ RUN: %t.exe
@ UNSUPPORTED: libcxxabi-no-exceptions
diff --git a/libcxxabi/test/native/arm-linux-eabi/ttype-encoding-90.pass.sh.s b/libcxxabi/test/native/arm-linux-eabi/ttype-encoding-90.pass.sh.s
index 837602bceab6..40139bbd87bc 100644
--- a/libcxxabi/test/native/arm-linux-eabi/ttype-encoding-90.pass.sh.s
+++ b/libcxxabi/test/native/arm-linux-eabi/ttype-encoding-90.pass.sh.s
@@ -1,4 +1,4 @@
-@ RUN: %cxx %flags %link_flags %s -o %t.exe
+@ RUN: %{cxx} %{flags} %{link_flags} %s -o %t.exe
@ RUN: %t.exe
@ UNSUPPORTED: libcxxabi-no-exceptions
More information about the libcxx-commits
mailing list