diff options
-rw-r--r-- | lib/asan/lit_tests/Unit/lit.site.cfg.in | 8 | ||||
-rw-r--r-- | lib/lit.common.unit.cfg | 4 | ||||
-rw-r--r-- | lib/msan/tests/lit.site.cfg.in | 8 | ||||
-rw-r--r-- | lib/tsan/lit_tests/Unit/lit.site.cfg.in | 3 |
4 files changed, 18 insertions, 5 deletions
diff --git a/lib/asan/lit_tests/Unit/lit.site.cfg.in b/lib/asan/lit_tests/Unit/lit.site.cfg.in index 401c3a8cc..07584a6fd 100644 --- a/lib/asan/lit_tests/Unit/lit.site.cfg.in +++ b/lib/asan/lit_tests/Unit/lit.site.cfg.in @@ -3,8 +3,14 @@ config.target_triple = "@TARGET_TRIPLE@" config.llvm_src_root = "@LLVM_SOURCE_DIR@" -config.build_type = "@CMAKE_BUILD_TYPE@" +config.llvm_build_mode = "@LLVM_BUILD_MODE@" config.asan_binary_dir = "@ASAN_BINARY_DIR@" +try: + config.llvm_build_mode = config.llvm_build_mode % lit.params +except KeyError,e: + key, = e.args + lit.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key)) + # Let the main config do the real work. lit.load_config(config, "@ASAN_SOURCE_DIR@/lit_tests/Unit/lit.cfg") diff --git a/lib/lit.common.unit.cfg b/lib/lit.common.unit.cfg index 8250b4a82..ca00abb65 100644 --- a/lib/lit.common.unit.cfg +++ b/lib/lit.common.unit.cfg @@ -7,8 +7,8 @@ import os # Setup test format -build_type = getattr(config, "build_type", "Debug") -config.test_format = lit.formats.GoogleTest(build_type, "Test") +llvm_build_mode = getattr(config, "llvm_build_mode", "Debug") +config.test_format = lit.formats.GoogleTest(llvm_build_mode, "Test") # Setup test suffixes. config.suffixes = [] diff --git a/lib/msan/tests/lit.site.cfg.in b/lib/msan/tests/lit.site.cfg.in index bb9a28d6a..ad0ff3c01 100644 --- a/lib/msan/tests/lit.site.cfg.in +++ b/lib/msan/tests/lit.site.cfg.in @@ -1,9 +1,15 @@ ## Autogenerated by LLVM/Clang configuration. # Do not edit! -config.build_type = "@CMAKE_BUILD_TYPE@" config.llvm_obj_root = "@LLVM_BINARY_DIR@" config.llvm_src_root = "@LLVM_SOURCE_DIR@" +config.llvm_build_mode = "@LLVM_BUILD_MODE@" + +try: + config.llvm_build_mode = config.llvm_build_mode % lit.params +except KeyError,e: + key, = e.args + lit.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key)) # Let the main config do the real work. lit.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg") diff --git a/lib/tsan/lit_tests/Unit/lit.site.cfg.in b/lib/tsan/lit_tests/Unit/lit.site.cfg.in index 23654b9be..420cdcaa6 100644 --- a/lib/tsan/lit_tests/Unit/lit.site.cfg.in +++ b/lib/tsan/lit_tests/Unit/lit.site.cfg.in @@ -1,15 +1,16 @@ ## Autogenerated by LLVM/Clang configuration. # Do not edit! -config.build_type = "@CMAKE_BUILD_TYPE@" config.llvm_obj_root = "@LLVM_BINARY_DIR@" config.llvm_src_root = "@LLVM_SOURCE_DIR@" config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" +config.llvm_build_mode = "@LLVM_BUILD_MODE@" # LLVM tools dir can be passed in lit parameters, so try to # apply substitution. try: config.llvm_tools_dir = config.llvm_tools_dir % lit.params + config.llvm_build_mode = config.llvm_build_mode % lit.params except KeyError,e: key, = e.args lit.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key)) |