[Lldb-commits] [PATCH] D44159: Next batch of test-tree-cleaning changes

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 6 09:24:12 PST 2018


labath created this revision.
labath added a reviewer: aprantl.
Herald added subscribers: mehdi_amini, ki.stfu.

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.


https://reviews.llvm.org/D44159

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44159.137217.patch
Type: text/x-patch
Size: 22808 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180306/5c202e56/attachment-0001.bin>


More information about the lldb-commits mailing list