diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbtest.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index c3dc2a9..2285173 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -4,10 +4,6 @@ LLDB module which provides the abstract base class of lldb test case. The concrete subclass can override lldbtest.TestBase in order to inherit the common behavior for unitest.TestCase.setUp/tearDown implemented in this file. -The subclass should override the attribute mydir in order for the python runtime -to locate the individual test cases when running as part of a large test suite -or when running each test case as a separate python invocation. - ./dotest.py provides a test driver which sets up the environment to run the entire of part of the test suite . Example: @@ -539,7 +535,9 @@ class Base(unittest2.TestCase): Do current directory manipulation. """ # Fail fast if 'mydir' attribute is not overridden. - if not cls.mydir or len(cls.mydir) == 0: + if not cls.mydir: + cls.mydir = Base.compute_mydir(sys.modules[cls.__module__].__file__) + if not cls.mydir: raise Exception("Subclasses must override the 'mydir' attribute.") # Save old working directory. @@ -1703,11 +1701,6 @@ class TestBase(Base): Important things for test class writers: - - Overwrite the mydir class attribute, otherwise your test class won't - run. It specifies the relative directory to the top level 'test' so - the test harness can change to the correct working directory before - running your test. - - The setUp method sets up things to facilitate subsequent interactions with the debugger as part of the test. These include: - populate the test method name |