[lit] Use py2&3 compatible exec() syntax.
llvm-svn: 187862
This commit is contained in:
parent
c9568b84b7
commit
4e06f0d106
|
@ -1,6 +1,8 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
PY2 = sys.version_info[0] < 3
|
||||
|
||||
class TestingConfig:
|
||||
""""
|
||||
TestingConfig - Information on the tests inside a suite.
|
||||
|
@ -59,7 +61,11 @@ class TestingConfig:
|
|||
cfg_globals['lit'] = litConfig
|
||||
cfg_globals['__file__'] = path
|
||||
try:
|
||||
exec f in cfg_globals
|
||||
data = f.read()
|
||||
if PY2:
|
||||
exec("exec data in cfg_globals")
|
||||
else:
|
||||
exec(data, cfg_globals)
|
||||
if litConfig.debug:
|
||||
litConfig.note('... loaded config %r' % path)
|
||||
except SystemExit:
|
||||
|
|
Loading…
Reference in New Issue