summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-03-16 12:04:46 +0000
committerPavel Labath <labath@google.com>2018-03-16 12:04:46 +0000
commit63047d05c040c8377ba493b3e0ea6176c402edc1 (patch)
tree49e17a59da9bd2831aa5f8598b7efcaa87a0522c /lldb/packages/Python/lldbsuite/test/functionalities
parenteacfefd0563fa886e6d34758867150e6f6eae13e (diff)
downloadbcm5719-llvm-63047d05c040c8377ba493b3e0ea6176c402edc1.tar.gz
bcm5719-llvm-63047d05c040c8377ba493b3e0ea6176c402edc1.zip
[dotest] Clean up test folder clean-up
Summary: This patch implements a unified way of cleaning the build folder of each test. This is done by completely removing the build folder before each test, in the respective setUp() method. Previously, we were using a combination of several methods, each with it's own drawbacks: - nuking the entire build tree before running dotest: the issue here is that this did not take place if you ran dotest manually - running "make clean" before the main "make" target: this relied on the clean command being correctly implemented. This was usually true, but not always. - for files which were not produced by make, each python file was responsible for ensuring their deleting, using a variety of methods. With this approach, the previous methods become redundant. I remove the first two, since they are centralized. For the other various bits of clean-up code in python files, I indend to delete it when I come across it. Reviewers: aprantl Subscribers: emaste, ki.stfu, mgorny, eraman, lldb-commits Differential Revision: https://reviews.llvm.org/D44526 llvm-svn: 327703
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py1
3 files changed, 1 insertions, 5 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
index 7f78c8656ba..4385304c88b 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
@@ -64,7 +64,6 @@ class CompDirSymLinkTestCase(TestBase):
self.line)
def create_src_symlink(self):
- self.makeBuildDir()
pwd_symlink = self.getBuildArtifact('pwd_symlink')
if os.path.exists(pwd_symlink):
os.unlink(pwd_symlink)
@@ -73,7 +72,7 @@ class CompDirSymLinkTestCase(TestBase):
return pwd_symlink
def doBuild(self, pwd_symlink):
- self.build(None, None, {'PWD': pwd_symlink}, True)
+ self.build(None, None, {'PWD': pwd_symlink})
exe = self.getBuildArtifact(_EXE_NAME)
self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py b/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
index cf1c448022b..c6ad75f014e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
@@ -30,7 +30,6 @@ class CommandScriptImmediateOutputTestCase (PExpectTest):
@expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr26139")
def test_command_script_immediate_output_console(self):
"""Test that LLDB correctly allows scripted commands to set immediate output to the console."""
- self.makeBuildDir()
self.launch(timeout=10)
script = os.path.join(self.getSourceDir(), 'custom_command.py')
@@ -53,7 +52,6 @@ class CommandScriptImmediateOutputTestCase (PExpectTest):
@expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr26139")
def test_command_script_immediate_output_file(self):
"""Test that LLDB correctly allows scripted commands to set immediate output to a file."""
- self.makeBuildDir()
self.launch(timeout=10)
test_files = {self.getBuildArtifact('read.txt'): 'r',
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py b/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
index ece566a64f3..52b1e8920e3 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
@@ -41,7 +41,6 @@ class ExecTestCase(TestBase):
self.do_test(True)
def do_test(self, skip_exec):
- self.makeBuildDir()
exe = self.getBuildArtifact("a.out")
if self.getArchitecture() == 'x86_64':
source = self.getSourcePath("main.cpp")
OpenPOWER on IntegriCloud