From 448b777b864a312e3b2ceae1e0cd59752a1fe90e Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Mon, 6 Apr 2020 16:45:00 -0400 Subject: [PATCH] Stop passing site cfg files via --param to llvm-lit. This has been unnecessary since https://reviews.llvm.org/D37756. https://reviews.llvm.org/D37838 removed it for llvm. This removes it from clang, lld, clang-tools-extra (and the GN build). No intended behavior change. Differential Revision: https://reviews.llvm.org/D77585 --- clang-tools-extra/clangd/test/CMakeLists.txt | 3 +++ clang/test/CMakeLists.txt | 7 ------- lld/test/CMakeLists.txt | 8 -------- llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn | 9 +++++++-- llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn | 6 ------ llvm/utils/gn/secondary/clang/test/BUILD.gn | 5 ----- llvm/utils/gn/secondary/lld/test/BUILD.gn | 5 ----- llvm/utils/gn/secondary/llvm/test/BUILD.gn | 5 ----- 8 files changed, 10 insertions(+), 38 deletions(-) diff --git a/clang-tools-extra/clangd/test/CMakeLists.txt b/clang-tools-extra/clangd/test/CMakeLists.txt index 1054fd5..c5cc7e3 100644 --- a/clang-tools-extra/clangd/test/CMakeLists.txt +++ b/clang-tools-extra/clangd/test/CMakeLists.txt @@ -35,5 +35,8 @@ configure_lit_site_cfg( ) add_lit_testsuite(check-clangd "Running the Clangd regression tests" + # clangd doesn't put unittest configs in test/unit like every other project. + # Because of that, this needs to pass two folders here, while every other + # project only needs to pass CMAKE_CURRENT_BINARY_DIR. ${CMAKE_CURRENT_BINARY_DIR}/../unittests;${CMAKE_CURRENT_BINARY_DIR} DEPENDS ${CLANGD_TEST_DEPS}) diff --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt index ca326fe..38bbc5b 100644 --- a/clang/test/CMakeLists.txt +++ b/clang/test/CMakeLists.txt @@ -106,16 +106,9 @@ if (CLANG_BUILD_EXAMPLES) endif () set(CLANG_TEST_PARAMS - clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg USE_Z3_SOLVER=0 ) -set(ANALYZER_TEST_PARAMS - USE_Z3_SOLVER=0) - -set(ANALYZER_TEST_PARAMS_Z3 - USE_Z3_SOLVER=1) - if( NOT CLANG_BUILT_STANDALONE ) list(APPEND CLANG_TEST_DEPS llvm-config diff --git a/lld/test/CMakeLists.txt b/lld/test/CMakeLists.txt index 8be42c4..8072138 100644 --- a/lld/test/CMakeLists.txt +++ b/lld/test/CMakeLists.txt @@ -44,14 +44,8 @@ if (LLVM_INCLUDE_TESTS) list(APPEND LLD_TEST_DEPS LLDUnitTests) endif() -set(LLD_TEST_PARAMS - lld_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg - ) - add_lit_testsuite(check-lld "Running lld test suite" ${CMAKE_CURRENT_BINARY_DIR} - PARAMS lld_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg - lld_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg DEPENDS ${LLD_TEST_DEPS} ) @@ -59,8 +53,6 @@ add_custom_target(lld-test-depends DEPENDS ${LLD_TEST_DEPS}) set_target_properties(lld-test-depends PROPERTIES FOLDER "lld tests") add_lit_testsuites(LLD ${CMAKE_CURRENT_SOURCE_DIR} - PARAMS lld_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg - lld_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg DEPENDS ${LLD_TEST_DEPS} ) diff --git a/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn index 22a76a8..4dc4c27 100644 --- a/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn +++ b/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn @@ -21,8 +21,9 @@ write_lit_config("lit_site_cfg") { output = clangd_lit_site_cfg_file extra_values = [ - "CMAKE_CURRENT_BINARY_DIR=" + rebase_path( - get_label_info("//clang-tools-extra/clangd/test", "target_out_dir")), + "CMAKE_CURRENT_BINARY_DIR=" + + rebase_path(get_label_info("//clang-tools-extra/clangd/test", + "target_out_dir")), "CMAKE_CURRENT_SOURCE_DIR=" + rebase_path("//clang-tools-extra/clangd/test"), @@ -91,6 +92,10 @@ action("check-clangd") { } args = [ "-sv", + + # clangd doesn't put unittest configs in test/unit like every other project. + # Because of that, this needs to pass two folders here, while every other + # project only needs to pass CMAKE_CURRENT_BINARY_DIR. rebase_path(get_path_info(clangd_lit_site_cfg_file, "dir"), root_out_dir), rebase_path(get_path_info(clangd_lit_unit_site_cfg_file, "dir"), root_out_dir), diff --git a/llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn index 6646ef1..97715cf 100644 --- a/llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn +++ b/llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn @@ -90,12 +90,6 @@ action("check-clang-tools") { } args = [ "-sv", - "--param", - "clang_site_config=" + - rebase_path(clang_tools_extra_lit_site_cfg_file, root_out_dir), - "--param", - "clang_unit_site_config=" + - rebase_path(clang_tools_extra_lit_unit_site_cfg_file, root_out_dir), rebase_path(".", root_out_dir), ] outputs = [ "$target_gen_dir/run-lit" ] # Non-existing, so that ninja runs it diff --git a/llvm/utils/gn/secondary/clang/test/BUILD.gn b/llvm/utils/gn/secondary/clang/test/BUILD.gn index 84ac2e8..f215c35 100644 --- a/llvm/utils/gn/secondary/clang/test/BUILD.gn +++ b/llvm/utils/gn/secondary/clang/test/BUILD.gn @@ -189,11 +189,6 @@ action("check-clang") { } args = [ "-sv", - "--param", - "clang_site_config=" + rebase_path(clang_lit_site_cfg_file, root_out_dir), - "--param", - "clang_unit_site_config=" + - rebase_path(clang_lit_unit_site_cfg_file, root_out_dir), rebase_path(".", root_out_dir), ] outputs = [ "$target_gen_dir/run-lit" ] # Non-existing, so that ninja runs it diff --git a/llvm/utils/gn/secondary/lld/test/BUILD.gn b/llvm/utils/gn/secondary/lld/test/BUILD.gn index 5408ea8..b0ccb7e 100644 --- a/llvm/utils/gn/secondary/lld/test/BUILD.gn +++ b/llvm/utils/gn/secondary/lld/test/BUILD.gn @@ -110,11 +110,6 @@ action("check-lld") { } args = [ "-sv", - "--param", - "lld_site_config=" + rebase_path(lld_lit_site_cfg_file, root_out_dir), - "--param", - "lld_unit_site_config=" + - rebase_path(lld_lit_unit_site_cfg_file, root_out_dir), rebase_path(".", root_out_dir), ] outputs = [ "$target_gen_dir/run-lit" ] # Non-existing, so that ninja runs it diff --git a/llvm/utils/gn/secondary/llvm/test/BUILD.gn b/llvm/utils/gn/secondary/llvm/test/BUILD.gn index c7740ac..427b2c0 100644 --- a/llvm/utils/gn/secondary/llvm/test/BUILD.gn +++ b/llvm/utils/gn/secondary/llvm/test/BUILD.gn @@ -289,11 +289,6 @@ action("check-llvm") { } args = [ "-sv", - "--param", - "llvm_site_config=" + rebase_path(llvm_lit_site_cfg_file, root_out_dir), - "--param", - "llvm_unit_site_config=" + - rebase_path(llvm_lit_unit_site_cfg_file, root_out_dir), rebase_path(".", root_out_dir), ] outputs = [ "$target_gen_dir/run-lit" ] # Non-existing, so that ninja runs it -- 2.7.4