[llvm] r347254 - Fix clang test suite on Windows by reverting part of r347216
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 19 11:36:28 PST 2018
Author: rnk
Date: Mon Nov 19 11:36:28 2018
New Revision: 347254
URL: http://llvm.org/viewvc/llvm-project?rev=347254&view=rev
Log:
Fix clang test suite on Windows by reverting part of r347216
Otherwise, the clang analyzer tests fail on Windows when attempting to
unpickle AnalyzerTest objects in the worker processes. The pattern of,
add to path, import, remove from path, serialize, deserialize, doesn't
work. Once something gets added to the path, if we want to move it
across the wire for multiprocessing, we need to keep the module on
sys.path.
Modified:
llvm/trunk/utils/lit/lit/TestingConfig.py
Modified: llvm/trunk/utils/lit/lit/TestingConfig.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestingConfig.py?rev=347254&r1=347253&r2=347254&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestingConfig.py (original)
+++ llvm/trunk/utils/lit/lit/TestingConfig.py Mon Nov 19 11:36:28 2018
@@ -85,9 +85,7 @@ class TestingConfig:
cfg_globals['config'] = self
cfg_globals['lit_config'] = litConfig
cfg_globals['__file__'] = path
- original_sys_path = list(sys.path)
try:
- sys.path.insert(0, os.path.dirname(path))
exec(compile(data, path, 'exec'), cfg_globals, None)
if litConfig.debug:
litConfig.note('... loaded config %r' % path)
@@ -102,7 +100,6 @@ class TestingConfig:
litConfig.fatal(
'unable to parse config file %r, traceback: %s' % (
path, traceback.format_exc()))
- sys.path = original_sys_path
self.finish(litConfig)
def __init__(self, parent, name, suffixes, test_format,
More information about the llvm-commits
mailing list