brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 000aa29 Raw
43 lines · python
1# ===----------------------------------------------------------------------===##2#3# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4# See https://llvm.org/LICENSE.txt for license information.5# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6#7# ===----------------------------------------------------------------------===##8 9# Test that all named declarations with external linkage match the10# exported declarations in their associated module partition.11# Then it tests the sum of the exported declarations in the module12# partitions matches the export of the std.compat module.13 14# Note the test of the std.compat module requires all partitions to be tested15# first. Since lit tests have no dependencies, this means the test needs16# to be one monolitic test. Since the test doesn't take very long it's17# not a huge issue.18 19# RUN: %{python} %s %{libcxx-dir}/utils20 21import sys22 23sys.path.append(sys.argv[1])24from libcxx.header_information import module_c_headers25from libcxx.test.modules import module_test_generator26 27generator = module_test_generator(28    "%t",29    "%{module-dir}",30    "%{clang-tidy}",31    "%{test-tools-dir}/clang_tidy_checks/libcxx-tidy.plugin",32    "%{cxx}",33    "%{flags} %{compile_flags}",34    "std.compat",35)36 37 38print("//--- module_std_compat.sh.cpp")39generator.write_test(40    "std.compat",41    module_c_headers,42)43