From 08776defa583676ac5c19451c6fb4fc184ee16ab Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Fri, 27 Mar 2020 10:04:13 -0400 Subject: [PATCH] [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=e`, which is surprising and nonsensical. It also means that something like `%compile_module` could be expanded to `_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. --- .../libcxx/atomics/atomics.align/align.pass.sh.cpp | 4 ++-- .../exception_safety_exceptions_disabled.sh.cpp | 4 ++-- .../test/libcxx/depr/depr.c.headers/math_h.sh.cpp | 2 +- libcxx/test/libcxx/double_include.sh.cpp | 8 +++---- .../support.coroutines/dialect_support.sh.cpp | 4 ++-- .../support.coroutines/version.sh.cpp | 4 ++-- libcxx/test/libcxx/include_as_c.sh.cpp | 2 +- .../directory_entry.mods/last_write_time.sh.cpp | 4 ++-- .../filesystems/convert_file_time.sh.cpp | 4 ++-- .../support.dynamic/libcpp_deallocate.sh.cpp | 16 ++++++------- .../support.dynamic/new_faligned_allocation.sh.cpp | 4 ++-- libcxx/test/libcxx/min_max_macros.sh.cpp | 2 +- .../test/libcxx/modules/cinttypes_exports.sh.cpp | 2 +- libcxx/test/libcxx/modules/clocale_exports.sh.cpp | 2 +- libcxx/test/libcxx/modules/cstdint_exports.sh.cpp | 2 +- .../test/libcxx/modules/inttypes_h_exports.sh.cpp | 2 +- libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp | 2 +- libcxx/test/libcxx/modules/stds_include.sh.cpp | 14 +++++------ libcxx/test/libcxx/no_assert_include.sh.cpp | 2 +- .../c.math/fdelayed-template-parsing.sh.cpp | 4 ++-- libcxx/test/libcxx/selftest/exec.sh.cpp | 4 ++-- libcxx/test/libcxx/selftest/not_test.sh.cpp | 4 ++-- libcxx/test/libcxx/selftest/test.sh.cpp | 4 ++-- .../libcxx/strings/basic.string/PR42676.sh.cpp | 4 ++-- .../abi_bug_cxx03_cxx11_example.sh.cpp | 8 +++---- .../meta/stress_tests/stress_test_is_same.sh.cpp | 4 ++-- .../stress_tests/stress_test_metafunctions.sh.cpp | 6 ++--- .../stress_test_variant_overloads_impl.sh.cpp | 6 ++--- .../pretty_printers/gdb_pretty_printer_test.sh.cpp | 4 ++-- .../map/PR28469_undefined_behavior_segfault.sh.cpp | 4 ++-- .../test/std/depr/depr.c.headers/stdint_h.sh.cpp | 4 ++-- .../new.delete/new.delete.array/new_size.sh.cpp | 2 +- .../new.delete.array/new_size_align.sh.cpp | 2 +- .../new.delete.array/new_size_align_nothrow.sh.cpp | 2 +- .../new.delete.array/new_size_nothrow.sh.cpp | 2 +- .../sized_delete_array_fsizeddeallocation.sh.cpp | 4 ++-- .../new.delete.single/new_size_align.sh.cpp | 2 +- .../new_size_align_nothrow.sh.cpp | 2 +- .../sized_delete_fsizeddeallocation.sh.cpp | 4 ++-- .../wait_terminates.sh.cpp | 14 +++++------ libcxx/utils/libcxx/test/config.py | 28 +++++++++++----------- libcxxabi/test/incomplete_type.sh.cpp | 6 ++--- .../arm-linux-eabi/ttype-encoding-00.pass.sh.s | 2 +- .../arm-linux-eabi/ttype-encoding-90.pass.sh.s | 2 +- 44 files changed, 106 insertions(+), 106 deletions(-) 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 16badab..48f7923 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 1e9cbde..8f817de 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 8e0fad7..a7ae41a 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 42f6376..b2d475c 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 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 237fbc4..1f49a4a 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 // 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 b11ea93..e1384b2 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 diff --git a/libcxx/test/libcxx/include_as_c.sh.cpp b/libcxx/test/libcxx/include_as_c.sh.cpp index 67d5e14..c001c63 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 #include 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 17b654e..90b3a43 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 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 55cd659..083ff53 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 #include 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 970b7fc..7c6692d4 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 #include 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 bfc26df..77e26bf 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 #include diff --git a/libcxx/test/libcxx/min_max_macros.sh.cpp b/libcxx/test/libcxx/min_max_macros.sh.cpp index 47c8a09..4e09e8e 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 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 70477d9..135fb83 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 re-exports -// RUN: %build_module +// RUN: %{build_module} #include diff --git a/libcxx/test/libcxx/modules/clocale_exports.sh.cpp b/libcxx/test/libcxx/modules/clocale_exports.sh.cpp index 6c4bc26..29086de 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 diff --git a/libcxx/test/libcxx/modules/cstdint_exports.sh.cpp b/libcxx/test/libcxx/modules/cstdint_exports.sh.cpp index c473245..3ac9999 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 re-exports -// RUN: %build_module +// RUN: %{build_module} #include diff --git a/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp b/libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp index a653b05..828635a 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 diff --git a/libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp b/libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp index ec86ad8..f38e5f4 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 diff --git a/libcxx/test/libcxx/modules/stds_include.sh.cpp b/libcxx/test/libcxx/modules/stds_include.sh.cpp index 35c9eee..c71fb9a 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 diff --git a/libcxx/test/libcxx/no_assert_include.sh.cpp b/libcxx/test/libcxx/no_assert_include.sh.cpp index 25e3477..2b5f5f0 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 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 37d09a8..ffd9842 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 #include diff --git a/libcxx/test/libcxx/selftest/exec.sh.cpp b/libcxx/test/libcxx/selftest/exec.sh.cpp index 6886813..19c3d59 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 #include diff --git a/libcxx/test/libcxx/selftest/not_test.sh.cpp b/libcxx/test/libcxx/selftest/not_test.sh.cpp index 8dbf708..56da5ed5 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 1fc1754..5c4db16 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 7037482..31bf81e 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 #include 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 2fc2f32..e367074 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 #include 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 72d3efa..cfd8adb 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 #include 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 5096691..6222d5c 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 #include 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 013d434..212d915 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 093fa4f..268501f 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 #include 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 030fdaf..4bd33ce 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} // 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 bcc8a11..e385669 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 // 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 a04ceb6..9d1423a 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 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 e2a6159..8bd3294 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 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 5ad81863..aa70740 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 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 53af2c7..11f8d4e 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 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 41739c0..d604e8c 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 a0d99c7..c062a22 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 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 54b25ac..8a51b03 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 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 3d62040..46d769b 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 8afa051..df02f7a 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 2c103d5..2d0c3de 100644 --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -1044,30 +1044,30 @@ class Configuration(object): 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 @@ class Configuration(object): (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 5937c83..7114724 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 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 0484e9f..49166da 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 837602b..40139bb 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 -- 2.7.4