Skip to content

Commit 52ce677

Browse files
committed
[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
1 parent b0aed82 commit 52ce677

File tree

8 files changed

+38
-2
lines changed

8 files changed

+38
-2
lines changed

clang-tools-extra/clangd/test/lit.cfg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,8 @@ def calculate_arch_features(arch_string):
3636

3737
if config.have_zlib:
3838
config.available_features.add('zlib')
39+
40+
# It is not realistically possible to account for all options that could
41+
# possibly be present in system and user configuration files, so disable
42+
# default configs for the test runs.
43+
config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

clang-tools-extra/clangd/unittests/lit.cfg.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
"@SHLIBDIR@", "@LLVM_LIBS_DIR@",
1818
config.environment.get(shlibpath_var,'')))
1919

20-
21-
20+
# It is not realistically possible to account for all options that could
21+
# possibly be present in system and user configuration files, so disable
22+
# default configs for the test runs.
23+
config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,8 @@
1616
config.environment[shlibpath_var] = os.path.pathsep.join((
1717
"@SHLIBDIR@", "@LLVM_LIBS_DIR@",
1818
config.environment.get(shlibpath_var,'')))
19+
20+
# It is not realistically possible to account for all options that could
21+
# possibly be present in system and user configuration files, so disable
22+
# default configs for the test runs.
23+
config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

clang-tools-extra/include-cleaner/test/lit.cfg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@
1414
config.clang_tools_dir,
1515
config.llvm_tools_dir,
1616
config.environment['PATH']))
17+
18+
# It is not realistically possible to account for all options that could
19+
# possibly be present in system and user configuration files, so disable
20+
# default configs for the test runs.
21+
config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

clang-tools-extra/pseudo/test/Unit/lit.cfg.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@
1717
"@SHLIBDIR@", "@LLVM_LIBS_DIR@",
1818
config.environment.get(shlibpath_var,'')))
1919

20+
# It is not realistically possible to account for all options that could
21+
# possibly be present in system and user configuration files, so disable
22+
# default configs for the test runs.
23+
config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

clang-tools-extra/pseudo/test/lit.cfg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@
1414
config.clang_tools_dir,
1515
config.llvm_tools_dir,
1616
config.environment['PATH']))
17+
18+
# It is not realistically possible to account for all options that could
19+
# possibly be present in system and user configuration files, so disable
20+
# default configs for the test runs.
21+
config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

clang-tools-extra/test/Unit/lit.cfg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,8 @@
3535
shlibpath = os.path.pathsep.join((config.shlibdir, shlibpath))
3636

3737
config.environment[shlibpath_var] = shlibpath
38+
39+
# It is not realistically possible to account for all options that could
40+
# possibly be present in system and user configuration files, so disable
41+
# default configs for the test runs.
42+
config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

clang-tools-extra/test/lit.cfg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,8 @@
5959
# Plugins (loadable modules)
6060
if config.has_plugins and config.llvm_plugin_ext:
6161
config.available_features.add('plugins')
62+
63+
# It is not realistically possible to account for all options that could
64+
# possibly be present in system and user configuration files, so disable
65+
# default configs for the test runs.
66+
config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

0 commit comments

Comments
 (0)