summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2015-10-30 01:09:54 +0000
committerEnrico Granata <egranata@apple.com>2015-10-30 01:09:54 +0000
commit8627209b43a430d4d91e93648bc1f30f93a756fc (patch)
treed5f6b0bc3488fdaa234f7557765fdc2c8493ad5a /lldb/packages/Python/lldbsuite/test
parent17f0275d4c2ea19b5a2376e3b008c41f18358d31 (diff)
downloadbcm5719-llvm-8627209b43a430d4d91e93648bc1f30f93a756fc.tar.gz
bcm5719-llvm-8627209b43a430d4d91e93648bc1f30f93a756fc.zip
Some test cases that need the lldbExec path were failing because lldbExec was turning out to be None even though it was being validly set by dotest.py
It turns out that lldbtest_config was being imported locally to "lldbsuite.test" instead of globally, so when the test cases got individually brought by a global import via __import__ by unittest2, they did not see the lldbtest_config import, and ended up importing a new separate copy of it, with lldbExec unset This is a simple hackaround that brings lldbtest_config to global visibility and makes sure the configuration data is correctly shared llvm-svn: 251678
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index 7c08bac48db..0c569bc81e8 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -21,6 +21,10 @@ for available options.
"""
from __future__ import print_function
+# this module needs to have global visibility, otherwise test cases
+# will import it anew in their local namespace, essentially losing access
+# to all the configuration data
+globals()['lldbtest_config'] = __import__('lldbtest_config')
import use_lldb_suite
@@ -42,7 +46,6 @@ import test_results
from test_results import EventBuilder
import inspect
import unittest2
-import lldbtest_config
import test_categories
import six
OpenPOWER on IntegriCloud