summaryrefslogtreecommitdiffstats
path: root/lldb/test/lldbtest.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/lldbtest.py')
-rw-r--r--lldb/test/lldbtest.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py
index 69ca549e875..f31012034d6 100644
--- a/lldb/test/lldbtest.py
+++ b/lldb/test/lldbtest.py
@@ -33,6 +33,8 @@ $
from __future__ import print_function
+import lldb_shared
+
import abc
import gc
import glob
@@ -48,7 +50,8 @@ import unittest2
import lldb
import lldbtest_config
import lldbutil
-from _pyio import __metaclass__
+
+from six import add_metaclass
if sys.version_info.major < 3:
import urlparse
@@ -254,8 +257,8 @@ class recording(StringIO.StringIO):
print(self.getvalue(), file=self.session)
self.close()
+@add_metaclass(abc.ABCMeta)
class _BaseProcess(object):
- __metaclass__ = abc.ABCMeta
@abc.abstractproperty
def pid(self):
@@ -2279,6 +2282,8 @@ class LLDBTestCaseFactory(type):
newattrs[attrname] = attrvalue
return super(LLDBTestCaseFactory, cls).__new__(cls, name, bases, newattrs)
+# Setup the metaclass for this class to change the list of the test methods when a new class is loaded
+@add_metaclass(LLDBTestCaseFactory)
class TestBase(Base):
"""
This abstract base class is meant to be subclassed. It provides default
@@ -2339,9 +2344,6 @@ class TestBase(Base):
# Can be overridden by the LLDB_TIME_WAIT_NEXT_LAUNCH environment variable.
timeWaitNextLaunch = 1.0;
- # Setup the metaclass for this class to change the list of the test methods when a new class is loaded
- __metaclass__ = LLDBTestCaseFactory
-
def doDelay(self):
"""See option -w of dotest.py."""
if ("LLDB_WAIT_BETWEEN_TEST_CASES" in os.environ and
OpenPOWER on IntegriCloud