diff --git a/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/Inputs/def-and-decl.c b/clang/test/utils/update_cc_test_checks/Inputs/def-and-decl.c rename from llvm/test/tools/UpdateTestChecks/update_cc_test_checks/Inputs/def-and-decl.c rename to clang/test/utils/update_cc_test_checks/Inputs/def-and-decl.c diff --git a/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/Inputs/def-and-decl.c.expected b/clang/test/utils/update_cc_test_checks/Inputs/def-and-decl.c.expected rename from llvm/test/tools/UpdateTestChecks/update_cc_test_checks/Inputs/def-and-decl.c.expected rename to clang/test/utils/update_cc_test_checks/Inputs/def-and-decl.c.expected diff --git a/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/Inputs/mangled_names.c b/clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c rename from llvm/test/tools/UpdateTestChecks/update_cc_test_checks/Inputs/mangled_names.c rename to clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c diff --git a/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/Inputs/mangled_names.c.expected b/clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.expected rename from llvm/test/tools/UpdateTestChecks/update_cc_test_checks/Inputs/mangled_names.c.expected rename to clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.expected diff --git a/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/Inputs/mangled_names.c.funcsig.expected b/clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.funcsig.expected rename from llvm/test/tools/UpdateTestChecks/update_cc_test_checks/Inputs/mangled_names.c.funcsig.expected rename to clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.funcsig.expected diff --git a/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/def-and-decl.test b/clang/test/utils/update_cc_test_checks/def-and-decl.test rename from llvm/test/tools/UpdateTestChecks/update_cc_test_checks/def-and-decl.test rename to clang/test/utils/update_cc_test_checks/def-and-decl.test diff --git a/clang/test/utils/update_cc_test_checks/lit.local.cfg b/clang/test/utils/update_cc_test_checks/lit.local.cfg new file mode 100644 --- /dev/null +++ b/clang/test/utils/update_cc_test_checks/lit.local.cfg @@ -0,0 +1,25 @@ +import os + +import lit.util + +# python 2.7 backwards compatibility +try: + from shlex import quote as shell_quote +except ImportError: + from pipes import quote as shell_quote + + +config.test_format = lit.formats.ShTest(execute_external=False) +config.suffixes = ['.test'] + +clang_path = os.path.join(config.clang_tools_dir, 'clang') +extra_args = '--clang ' + shell_quote(clang_path) +opt_path = os.path.join(config.llvm_tools_dir, 'opt') +extra_args += ' --opt ' + shell_quote(opt_path) +script_path = os.path.join(config.llvm_src_root, 'utils', + 'update_cc_test_checks.py') +assert os.path.isfile(script_path) +config.substitutions.append( + ('%update_cc_test_checks', "%s %s %s" % ( + shell_quote(config.python_executable), shell_quote(script_path), + extra_args))) diff --git a/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/mangled_names.test b/clang/test/utils/update_cc_test_checks/mangled_names.test rename from llvm/test/tools/UpdateTestChecks/update_cc_test_checks/mangled_names.test rename to clang/test/utils/update_cc_test_checks/mangled_names.test diff --git a/llvm/test/tools/UpdateTestChecks/lit.local.cfg b/llvm/test/tools/UpdateTestChecks/lit.local.cfg --- a/llvm/test/tools/UpdateTestChecks/lit.local.cfg +++ b/llvm/test/tools/UpdateTestChecks/lit.local.cfg @@ -42,11 +42,3 @@ config.available_features.add('llvm-mca-binary') mca_arg = '--llvm-mca-binary ' + shell_quote(llvm_mca_path) add_update_script_substition('%update_test_checks', extra_args=mca_arg) - -clang_path = os.path.join(config.llvm_tools_dir, 'clang') -if os.path.isfile(clang_path): - config.available_features.add('clang-binary') - extra_args = '--clang ' + shell_quote(clang_path) - if os.path.isfile(opt_path): - extra_args += ' --opt ' + shell_quote(opt_path) - add_update_script_substition('%update_cc_test_checks', extra_args=extra_args) diff --git a/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/lit.local.cfg b/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/lit.local.cfg deleted file mode 100644 --- a/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/lit.local.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# These tests require clang. -if 'clang-binary' not in config.available_features: - config.unsupported = True