This is an archive of the discontinued LLVM Phabricator instance.

Next batch of test-tree-cleaning changes
ClosedPublic

Authored by labath on Mar 6 2018, 9:24 AM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Mar 6 2018, 9:24 AM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 15 2018, 6:50 AM
This revision was automatically updated to reflect the committed changes.