aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2012-01-31 14:07:55 -0500
committerEhsan Akhgari <ehsan.akhgari@gmail.com>2012-01-31 14:07:55 -0500
commitd48cba10976ff7665fb39768ca251c8f08e1bbe8 (patch)
tree3df39f0788bcb94ea6f1db30558749ed4695a35f /tests/runner.py
parentf10e3e811dee7522e737a93a3db53a5db1cf0b32 (diff)
Prevent the Settings object from pointing to two separate things
We need to do this dance because shared.py reassigns the global Settings object to point to a new class, but because Python is lexically scoped, the Settings global name in tests/runner.py would not get updated to point to the new name, which would cause changes to Settings.FOO_BAR in runner.py not be reflected in Settings.serialize() and therefore not being passed down to emcc.
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index d9953c14..94ab75ed 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -22,6 +22,7 @@ __rootpath__ = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def path_from_root(*pathelems):
return os.path.join(__rootpath__, *pathelems)
sys.path += [path_from_root('')]
+import tools.shared
from tools.shared import *
# Sanity check for config
@@ -40,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)