|
18 | 18 |
|
19 | 19 | # RUN: %{python} %s %{libcxx-dir}/utils |
20 | 20 |
|
| 21 | +# block Lit from interpreting a RUN/XFAIL/etc inside the generation script |
| 22 | +# END. |
| 23 | + |
21 | 24 | import sys |
22 | 25 | sys.path.append(sys.argv[1]) |
23 | 26 | from libcxx.header_information import lit_header_restrictions, public_headers |
|
29 | 32 | # for std in c++03 c++11 c++14 c++17 c++20 c++23 c++26; do <build>/bin/llvm-lit --param std=$std libcxx/test/libcxx/transitive_includes.gen.py; done |
30 | 33 | regenerate_expected_results = False |
31 | 34 |
|
32 | | -BLOCKLIT = '' # block Lit from interpreting a RUN/XFAIL/etc inside the generation script |
33 | 35 | if regenerate_expected_results: |
34 | 36 | print(f"""\ |
35 | 37 | //--- generate-transitive-includes.sh.cpp |
36 | | -// RUN{BLOCKLIT}: mkdir %t |
| 38 | +// RUN: mkdir %t |
37 | 39 | """) |
38 | 40 |
|
39 | 41 | all_traces = [] |
|
43 | 45 |
|
44 | 46 | normalized_header = re.sub('/', '_', header) |
45 | 47 | print(f"""\ |
46 | | -// RUN{BLOCKLIT}: echo "#include <{header}>" | %{{cxx}} -xc++ - %{{flags}} %{{compile_flags}} --trace-includes -fshow-skipped-includes --preprocess > /dev/null 2> %t/trace-includes.{normalized_header}.txt |
| 48 | +// RUN: echo "#include <{header}>" | %{{cxx}} -xc++ - %{{flags}} %{{compile_flags}} --trace-includes -fshow-skipped-includes --preprocess > /dev/null 2> %t/trace-includes.{normalized_header}.txt |
47 | 49 | """) |
48 | 50 | all_traces.append(f'%t/trace-includes.{normalized_header}.txt') |
49 | 51 |
|
50 | 52 | print(f"""\ |
51 | | -// RUN{BLOCKLIT}: %{{python}} %{{libcxx-dir}}/test/libcxx/transitive_includes_to_csv.py {' '.join(all_traces)} > %{{libcxx-dir}}/test/libcxx/transitive_includes/%{{cxx_std}}.csv |
| 53 | +// RUN: %{{python}} %{{libcxx-dir}}/test/libcxx/transitive_includes_to_csv.py {' '.join(all_traces)} > %{{libcxx-dir}}/test/libcxx/transitive_includes/%{{cxx_std}}.csv |
52 | 54 | """) |
53 | 55 |
|
54 | 56 | else: |
|
64 | 66 | {lit_header_restrictions.get(header, '')} |
65 | 67 |
|
66 | 68 | // TODO: Fix this test to make it work with localization or wide characters disabled |
67 | | -// UNSUPPORTED{BLOCKLIT}: no-localization, no-wide-characters, no-threads, no-filesystem, libcpp-has-no-experimental-tzdb, no-tzdb |
| 69 | +// UNSUPPORTED: no-localization, no-wide-characters, no-threads, no-filesystem, libcpp-has-no-experimental-tzdb, no-tzdb |
68 | 70 |
|
69 | 71 | // When built with modules, this test doesn't work because --trace-includes doesn't |
70 | 72 | // report the stack of includes correctly. |
71 | | -// UNSUPPORTED{BLOCKLIT}: clang-modules-build |
| 73 | +// UNSUPPORTED: clang-modules-build |
72 | 74 |
|
73 | 75 | // This test uses --trace-includes, which is not supported by GCC. |
74 | | -// UNSUPPORTED{BLOCKLIT}: gcc |
| 76 | +// UNSUPPORTED: gcc |
75 | 77 |
|
76 | 78 | // This test is not supported when we remove the transitive includes provided for backwards |
77 | 79 | // compatibility. When we bulk-remove them, we'll adjust the includes that are expected by |
78 | 80 | // this test instead. |
79 | | -// UNSUPPORTED{BLOCKLIT}: transitive-includes-disabled |
| 81 | +// UNSUPPORTED: transitive-includes-disabled |
80 | 82 |
|
81 | 83 | // TODO: Figure out why <stdatomic.h> doesn't work on FreeBSD |
82 | | -// UNSUPPORTED{BLOCKLIT}: LIBCXX-FREEBSD-FIXME |
| 84 | +// UNSUPPORTED: LIBCXX-FREEBSD-FIXME |
83 | 85 |
|
84 | | -// RUN{BLOCKLIT}: mkdir %t |
85 | | -// RUN{BLOCKLIT}: %{{cxx}} %s %{{flags}} %{{compile_flags}} --trace-includes -fshow-skipped-includes --preprocess > /dev/null 2> %t/trace-includes.txt |
86 | | -// RUN{BLOCKLIT}: %{{python}} %{{libcxx-dir}}/test/libcxx/transitive_includes_to_csv.py %t/trace-includes.txt > %t/actual_transitive_includes.csv |
87 | | -// RUN{BLOCKLIT}: cat %{{libcxx-dir}}/test/libcxx/transitive_includes/%{{cxx_std}}.csv | awk '/^{escaped_header} / {{ print }}' > %t/expected_transitive_includes.csv |
88 | | -// RUN{BLOCKLIT}: diff -w %t/expected_transitive_includes.csv %t/actual_transitive_includes.csv |
| 86 | +// RUN: mkdir %t |
| 87 | +// RUN: %{{cxx}} %s %{{flags}} %{{compile_flags}} --trace-includes -fshow-skipped-includes --preprocess > /dev/null 2> %t/trace-includes.txt |
| 88 | +// RUN: %{{python}} %{{libcxx-dir}}/test/libcxx/transitive_includes_to_csv.py %t/trace-includes.txt > %t/actual_transitive_includes.csv |
| 89 | +// RUN: cat %{{libcxx-dir}}/test/libcxx/transitive_includes/%{{cxx_std}}.csv | awk '/^{escaped_header} / {{ print }}' > %t/expected_transitive_includes.csv |
| 90 | +// RUN: diff -w %t/expected_transitive_includes.csv %t/actual_transitive_includes.csv |
89 | 91 | #include <{header}> |
90 | 92 | """) |
0 commit comments