1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00

[lit] Use py2&3 compatible exec() syntax.

llvm-svn: 187862
This commit is contained in:
Daniel Dunbar 2013-08-07 03:25:28 +00:00
parent e3dc2d9d07
commit 5a2d7118d8

View File

@ -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: