[dotest] Clean up test folder clean-up
authorPavel Labath <labath@google.com>
Fri, 16 Mar 2018 12:04:46 +0000 (12:04 +0000)
committerPavel Labath <labath@google.com>
Fri, 16 Mar 2018 12:04:46 +0000 (12:04 +0000)
commit63047d05c040c8377ba493b3e0ea6176c402edc1
tree49e17a59da9bd2831aa5f8598b7efcaa87a0522c
parenteacfefd0563fa886e6d34758867150e6f6eae13e
[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
17 files changed:
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
lldb/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py
lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py
lldb/packages/Python/lldbsuite/test/lldbinline.py
lldb/packages/Python/lldbsuite/test/lldbtest.py
lldb/packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
lldb/packages/Python/lldbsuite/test/plugins/builder_darwin.py
lldb/packages/Python/lldbsuite/test/plugins/builder_freebsd.py
lldb/packages/Python/lldbsuite/test/plugins/builder_linux.py
lldb/packages/Python/lldbsuite/test/plugins/builder_netbsd.py
lldb/packages/Python/lldbsuite/test/plugins/builder_win32.py
lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py
lldb/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py
lldb/test/CMakeLists.txt