[Lldb-commits] [lldb] r323219 - Move getBuildArtifact() from TestBase to Base and derive MiTestCaseBase from it
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 23 08:43:01 PST 2018
Author: adrian
Date: Tue Jan 23 08:43:01 2018
New Revision: 323219
URL: http://llvm.org/viewvc/llvm-project?rev=323219&view=rev
Log:
Move getBuildArtifact() from TestBase to Base and derive MiTestCaseBase from it
Thanks to Pavel Labath for pointing this out!
Modified:
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=323219&r1=323218&r2=323219&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Tue Jan 23 08:43:01 2018
@@ -717,6 +717,10 @@ class Base(unittest2.TestCase):
lldb.remote_platform.Run(shell_cmd)
self.addTearDownHook(clean_working_directory)
+ def getBuildArtifact(self, name="a.out"):
+ """Return absolute path to an artifact in the test's build directory."""
+ return os.path.join(os.getcwd(), name)
+
def setUp(self):
"""Fixture for unittest test case setup.
@@ -2269,10 +2273,6 @@ class TestBase(Base):
else:
self.fail("Can't build for debug info: %s" % self.debug_info)
- def getBuildArtifact(self, name="a.out"):
- """Return absolute path to an artifact in the test's build directory."""
- return os.path.join(os.getcwd(), name)
-
def run_platform_command(self, cmd):
platform = self.dbg.GetSelectedPlatform()
shell_command = lldb.SBPlatformShellCommand(cmd)
Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py?rev=323219&r1=323218&r2=323219&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py Tue Jan 23 08:43:01 2018
@@ -8,7 +8,7 @@ from __future__ import print_function
from lldbsuite.test.lldbtest import *
-class MiTestCaseBase(TestBase):
+class MiTestCaseBase(Base):
mydir = None
myexe = None
More information about the lldb-commits
mailing list