[llvm] r283705 - [lit] Remove Python 2.6 and below exec workaround
Brian Gesiak via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 9 18:11:54 PDT 2016
Author: modocache
Date: Sun Oct 9 20:11:52 2016
New Revision: 283705
URL: http://llvm.org/viewvc/llvm-project?rev=283705&view=rev
Log:
[lit] Remove Python 2.6 and below exec workaround
Summary:
The minimum version of Python required to run LLVM's test suite is 2.7.
Remove a workaround for older Python versions.
Reviewers: echristo, delcypher, beanz, ddunbar
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D25400
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=283705&r1=283704&r2=283705&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestingConfig.py (original)
+++ llvm/trunk/utils/lit/lit/TestingConfig.py Sun Oct 9 20:11:52 2016
@@ -1,7 +1,6 @@
import os
import sys
-OldPy = sys.version_info[0] == 2 and sys.version_info[1] < 7
class TestingConfig:
""""
@@ -73,13 +72,12 @@ class TestingConfig:
# Load the config script data.
data = None
- if not OldPy:
- f = open(path)
- try:
- data = f.read()
- except:
- litConfig.fatal('unable to load config file: %r' % (path,))
- f.close()
+ f = open(path)
+ try:
+ data = f.read()
+ except:
+ litConfig.fatal('unable to load config file: %r' % (path,))
+ f.close()
# Execute the config script to initialize the object.
cfg_globals = dict(globals())
@@ -87,10 +85,7 @@ class TestingConfig:
cfg_globals['lit_config'] = litConfig
cfg_globals['__file__'] = path
try:
- if OldPy:
- execfile(path, cfg_globals)
- else:
- exec(compile(data, path, 'exec'), cfg_globals, None)
+ exec(compile(data, path, 'exec'), cfg_globals, None)
if litConfig.debug:
litConfig.note('... loaded config %r' % path)
except SystemExit:
More information about the llvm-commits
mailing list