Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libc++] Simplify writing testing config files
Reduce code duplication by sharing most of the test suite setup across the different from-scratch configs. Differential Revision: https://reviews.llvm.org/D111196
- Loading branch information
Showing
6 changed files
with
60 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@AUTO_GEN_COMMENT@ | ||
|
||
@SERIALIZED_LIT_PARAMS@ | ||
|
||
# | ||
# This file performs the bridge between the CMake configuration and the Lit | ||
# configuration files by setting up the LitConfig object and various Lit | ||
# substitutions from CMake variables. | ||
# | ||
# Individual configuration files can take advantage of this bridge by | ||
# loading the file and then setting up the remaining Lit substitutions. | ||
# | ||
|
||
import os, site | ||
site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils')) | ||
import libcxx.test.format | ||
|
||
# Basic configuration of the test suite | ||
config.name = os.path.basename('@LIBCXX_TEST_CONFIG@') | ||
config.test_source_root = os.path.join('@LIBCXX_SOURCE_DIR@', 'test') | ||
config.test_format = libcxx.test.format.CxxStandardLibraryTest() | ||
config.recursiveExpansionLimit = 10 | ||
config.test_exec_root = '@CMAKE_BINARY_DIR@' | ||
|
||
# Add substitutions for bootstrapping the test suite configuration | ||
config.substitutions.append(('%{cxx}', '@CMAKE_CXX_COMPILER@')) | ||
config.substitutions.append(('%{libcxx}', '@LIBCXX_SOURCE_DIR@')) | ||
config.substitutions.append(('%{install}', '@CMAKE_BINARY_DIR@')) | ||
config.substitutions.append(('%{include}', '%{install}/@LIBCXX_INSTALL_INCLUDE_DIR@')) | ||
config.substitutions.append(('%{target-include}', '%{install}/@LIBCXX_INSTALL_INCLUDE_TARGET_DIR@')) | ||
config.substitutions.append(('%{lib}', '%{install}/@LIBCXX_INSTALL_LIBRARY_DIR@')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters