aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-10-04 16:36:15 +0200
committerMichał Górny <mgorny@gentoo.org>2022-10-13 07:03:14 +0200
commite7fc22c5c9c17b6966c57591a3a4f5a52824d062 (patch)
tree89bab237664007bdab6d53b0510bd76e01c1ef89
parent[clang] [Driver] Disable default configs via envvar during testing (diff)
downloadllvm-project-e7fc22c5c9c17b6966c57591a3a4f5a52824d062.tar.gz
llvm-project-e7fc22c5c9c17b6966c57591a3a4f5a52824d062.tar.bz2
llvm-project-e7fc22c5c9c17b6966c57591a3a4f5a52824d062.zip
[clang-tools-extra] [test] Use CLANG_NO_DEFAULT_CONFIG=1gentoo-15.0.2-r100
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 Gentoo-Component: clang
-rw-r--r--clang-tools-extra/clangd/test/lit.cfg.py5
-rw-r--r--clang-tools-extra/clangd/unittests/lit.cfg.py6
-rw-r--r--clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py5
-rw-r--r--clang-tools-extra/include-cleaner/test/lit.cfg.py5
-rw-r--r--clang-tools-extra/pseudo/test/Unit/lit.cfg.py4
-rw-r--r--clang-tools-extra/pseudo/test/lit.cfg.py5
-rw-r--r--clang-tools-extra/test/Unit/lit.cfg.py5
-rw-r--r--clang-tools-extra/test/lit.cfg.py5
8 files changed, 38 insertions, 2 deletions
diff --git a/clang-tools-extra/clangd/test/lit.cfg.py b/clang-tools-extra/clangd/test/lit.cfg.py
index 0f3d8b310b29..5292eaf2e99f 100644
--- a/clang-tools-extra/clangd/test/lit.cfg.py
+++ b/clang-tools-extra/clangd/test/lit.cfg.py
@@ -36,3 +36,8 @@ if config.clangd_tidy_checks:
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 754835e626e1..1db30ca7c751 100644
--- a/clang-tools-extra/clangd/unittests/lit.cfg.py
+++ b/clang-tools-extra/clangd/unittests/lit.cfg.py
@@ -17,5 +17,7 @@ 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/Unit/lit.cfg.py b/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
index baaf334b6a80..1b2910db9d47 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 @@ else:
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 1c189bc512d0..aa5bbd69f33b 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.environment['PATH'] = os.path.pathsep.join((
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 1ba9626e489a..b76d7dd0ee12 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 @@ 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/pseudo/test/lit.cfg.py b/clang-tools-extra/pseudo/test/lit.cfg.py
index d92c95c80b5f..01b1b7014fec 100644
--- a/clang-tools-extra/pseudo/test/lit.cfg.py
+++ b/clang-tools-extra/pseudo/test/lit.cfg.py
@@ -14,3 +14,8 @@ config.environment['PATH'] = os.path.pathsep.join((
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 b40e1cae29e0..1150b72431e0 100644
--- a/clang-tools-extra/test/Unit/lit.cfg.py
+++ b/clang-tools-extra/test/Unit/lit.cfg.py
@@ -35,3 +35,8 @@ if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir):
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 9b99bfd93440..871596ac8585 100644
--- a/clang-tools-extra/test/lit.cfg.py
+++ b/clang-tools-extra/test/lit.cfg.py
@@ -59,3 +59,8 @@ config.substitutions.append(
# 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"