[clang-tools-extra] 52ce677 - [clang-tools-extra] [test] Use CLANG_NO_DEFAULT_CONFIG=1

Michał Górny via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 4 11:09:08 PDT 2022


Author: Michał Górny
Date: 2022-10-04T20:08:56+02:00
New Revision: 52ce6776cf98e993c6ec04ae54b52e1354fff917

URL: https://github.com/llvm/llvm-project/commit/52ce6776cf98e993c6ec04ae54b52e1354fff917
DIFF: https://github.com/llvm/llvm-project/commit/52ce6776cf98e993c6ec04ae54b52e1354fff917.diff

LOG: [clang-tools-extra] [test] Use CLANG_NO_DEFAULT_CONFIG=1

Set CLANG_NO_DEFAULT_CONFIG=1 for clang-tools-extra tests to prevent
the system configuration files for clang from affecting the test
results.

Differential Revision: https://reviews.llvm.org/D135159

Added: 
    

Modified: 
    clang-tools-extra/clangd/test/lit.cfg.py
    clang-tools-extra/clangd/unittests/lit.cfg.py
    clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
    clang-tools-extra/include-cleaner/test/lit.cfg.py
    clang-tools-extra/pseudo/test/Unit/lit.cfg.py
    clang-tools-extra/pseudo/test/lit.cfg.py
    clang-tools-extra/test/Unit/lit.cfg.py
    clang-tools-extra/test/lit.cfg.py

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/test/lit.cfg.py b/clang-tools-extra/clangd/test/lit.cfg.py
index 0f3d8b310b290..5292eaf2e99f4 100644
--- a/clang-tools-extra/clangd/test/lit.cfg.py
+++ b/clang-tools-extra/clangd/test/lit.cfg.py
@@ -36,3 +36,8 @@ def calculate_arch_features(arch_string):
 
 if config.have_zlib:
   config.available_features.add('zlib')
+
+# It is not realistically possible to account for all options that could
+# possibly be present in system and user configuration files, so disable
+# default configs for the test runs.
+config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

diff  --git a/clang-tools-extra/clangd/unittests/lit.cfg.py b/clang-tools-extra/clangd/unittests/lit.cfg.py
index 754835e626e15..1db30ca7c7511 100644
--- a/clang-tools-extra/clangd/unittests/lit.cfg.py
+++ b/clang-tools-extra/clangd/unittests/lit.cfg.py
@@ -17,5 +17,7 @@
     "@SHLIBDIR@", "@LLVM_LIBS_DIR@",
     config.environment.get(shlibpath_var,'')))
 
-
-
+# It is not realistically possible to account for all options that could
+# possibly be present in system and user configuration files, so disable
+# default configs for the test runs.
+config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

diff  --git a/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py b/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
index baaf334b6a809..1b2910db9d47d 100644
--- a/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
+++ b/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
@@ -16,3 +16,8 @@
 config.environment[shlibpath_var] = os.path.pathsep.join((
     "@SHLIBDIR@", "@LLVM_LIBS_DIR@",
     config.environment.get(shlibpath_var,'')))
+
+# It is not realistically possible to account for all options that could
+# possibly be present in system and user configuration files, so disable
+# default configs for the test runs.
+config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

diff  --git a/clang-tools-extra/include-cleaner/test/lit.cfg.py b/clang-tools-extra/include-cleaner/test/lit.cfg.py
index 1c189bc512d0b..aa5bbd69f33b2 100644
--- a/clang-tools-extra/include-cleaner/test/lit.cfg.py
+++ b/clang-tools-extra/include-cleaner/test/lit.cfg.py
@@ -14,3 +14,8 @@
         config.clang_tools_dir,
         config.llvm_tools_dir,
         config.environment['PATH']))
+
+# It is not realistically possible to account for all options that could
+# possibly be present in system and user configuration files, so disable
+# default configs for the test runs.
+config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

diff  --git a/clang-tools-extra/pseudo/test/Unit/lit.cfg.py b/clang-tools-extra/pseudo/test/Unit/lit.cfg.py
index 1ba9626e489ad..b76d7dd0ee127 100644
--- a/clang-tools-extra/pseudo/test/Unit/lit.cfg.py
+++ b/clang-tools-extra/pseudo/test/Unit/lit.cfg.py
@@ -17,3 +17,7 @@
     "@SHLIBDIR@", "@LLVM_LIBS_DIR@",
     config.environment.get(shlibpath_var,'')))
 
+# It is not realistically possible to account for all options that could
+# possibly be present in system and user configuration files, so disable
+# default configs for the test runs.
+config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

diff  --git a/clang-tools-extra/pseudo/test/lit.cfg.py b/clang-tools-extra/pseudo/test/lit.cfg.py
index d92c95c80b5f1..01b1b7014fec1 100644
--- a/clang-tools-extra/pseudo/test/lit.cfg.py
+++ b/clang-tools-extra/pseudo/test/lit.cfg.py
@@ -14,3 +14,8 @@
         config.clang_tools_dir,
         config.llvm_tools_dir,
         config.environment['PATH']))
+
+# It is not realistically possible to account for all options that could
+# possibly be present in system and user configuration files, so disable
+# default configs for the test runs.
+config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

diff  --git a/clang-tools-extra/test/Unit/lit.cfg.py b/clang-tools-extra/test/Unit/lit.cfg.py
index b40e1cae29e09..1150b72431e0c 100644
--- a/clang-tools-extra/test/Unit/lit.cfg.py
+++ b/clang-tools-extra/test/Unit/lit.cfg.py
@@ -35,3 +35,8 @@
     shlibpath = os.path.pathsep.join((config.shlibdir, shlibpath))
 
 config.environment[shlibpath_var] = shlibpath
+
+# It is not realistically possible to account for all options that could
+# possibly be present in system and user configuration files, so disable
+# default configs for the test runs.
+config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

diff  --git a/clang-tools-extra/test/lit.cfg.py b/clang-tools-extra/test/lit.cfg.py
index 9b99bfd93440f..871596ac8585b 100644
--- a/clang-tools-extra/test/lit.cfg.py
+++ b/clang-tools-extra/test/lit.cfg.py
@@ -59,3 +59,8 @@
 # Plugins (loadable modules)
 if config.has_plugins and config.llvm_plugin_ext:
     config.available_features.add('plugins')
+
+# It is not realistically possible to account for all options that could
+# possibly be present in system and user configuration files, so disable
+# default configs for the test runs.
+config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"


        


More information about the cfe-commits mailing list