Next batch of test-tree-cleaning changes
authorPavel Labath <labath@google.com>
Thu, 15 Mar 2018 13:47:09 +0000 (13:47 +0000)
committerPavel Labath <labath@google.com>
Thu, 15 Mar 2018 13:47:09 +0000 (13:47 +0000)
commit107052ff9ded599519445833d755628703027801
treeffb1645cdd59e8a980cc33a5908377e4c9bf430d
parentdfc7eb490aab97f2fc93963bd0884ee30ceb257b
Next batch of test-tree-cleaning changes

Summary:
The changes here fall into several categories.

- some tests were redirecting inferior stdout/err to a file. For these I
  make sure we use an absolute path for the file. I also create a
  lldbutil.read_file_on_target helper function to encapsulate the
  differences between reading a file locally and remotely.
- some tests were redirecting the pexpect I/O into a file. For these I
  use a python StringIO object to avoid creating a file altogether.
- the TestSettings inferior was creating a file. Here, I make sure the
  inferior is launched with pwd=build-dir so that the files end up
  created there.
- lldb-mi --log (used by some tests) creates a log file in PWD without
  the ability say differently. To make this work I make sure to run
  lldb-mi with PWD=build_dir. This in turn necessitated a couple of
  changes in other lldb-mi tests, which were using relative paths to
  access the source tree.

Reviewers: aprantl

Subscribers: ki.stfu, mehdi_amini, lldb-commits

Differential Revision: https://reviews.llvm.org/D44159

llvm-svn: 327625
lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py
lldb/packages/Python/lldbsuite/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py
lldb/packages/Python/lldbsuite/test/lldbutil.py
lldb/packages/Python/lldbsuite/test/settings/TestSettings.py
lldb/packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py
lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiFile.py
lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py
lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py
lldb/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py