aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-31 14:11:57 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-31 14:11:57 -0800
commit2761fe8d19002c94aa25d92246fc9968ba7c2cac (patch)
treed2c4eb386d071f96330ce5de55ed79c815734efd /tests/runner.py
parentab7dacbf6278ad1cbe1633231d1c04abaa80b702 (diff)
parentd48cba10976ff7665fb39768ca251c8f08e1bbe8 (diff)
Merge pull request #198 from ehsan/import_shared_properly
Import shared.py properly
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/runner.py b/tests/runner.py
index ad411ee1..4bf8f008 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -18,12 +18,12 @@ import os, unittest, tempfile, shutil, time, inspect, sys, math, glob, tempfile,
# Setup
-__rootpath__ = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
+__rootpath__ = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def path_from_root(*pathelems):
return os.path.join(__rootpath__, *pathelems)
-exec(open(path_from_root('tools', 'shared.py'), 'r').read())
-
sys.path += [path_from_root('')]
+import tools.shared
+from tools.shared import *
# Sanity check for config
@@ -41,7 +41,9 @@ class RunnerCore(unittest.TestCase):
# Change this to None to get stderr reporting, for debugging purposes
def setUp(self):
+ global Settings
Settings.reset()
+ Settings = tools.shared.Settings
self.banned_js_engines = []
if not self.save_dir:
dirname = tempfile.mkdtemp(prefix='emscripten_test_' + self.__class__.__name__ + '_', dir=TEMP_DIR)