This is an archive of the discontinued LLVM Phabricator instance.

Fix a couple of more tests to not create files in the source tree
ClosedPublic

Authored by labath on Feb 20 2018, 3:24 AM.

Details

Summary

These were not being flaky, but they're still making the tree dirty.

These tests were using lldbutil.append_to_process_working_directory to
derive the file path so I fix them by modifying the function to return
the build directory for local tests.

Technically, now the path returned by this function does not point to
the process working directory for local tests, but I think it makes
sense to keep the function name, as I think we should move towards
launching the process in the build directory (and I intend to change
this for the handful of inferiors that actually care about their PWD,
for example because they need to create files there).

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Feb 20 2018, 3:24 AM
aprantl accepted this revision.Feb 20 2018, 8:45 AM

Thanks!

By the way, just in case you are motivated :-), one outstanding task is also to replace all uses of the clean target in the makefiles with simply removing the test build directory.

This revision is now accepted and ready to land.Feb 20 2018, 8:45 AM

LGTM. This is really good work, thanks

davide accepted this revision.Feb 20 2018, 10:26 AM

Thanks!

By the way, just in case you are motivated :-), one outstanding task is also to replace all uses of the clean target in the makefiles with simply removing the test build directory.

I think I'll get around to that eventually if someone doesn't beat me to it (right now my goal is to be able to run the tests with the source tree mounted read-only). I'm thinking of nuking the build dir *before* the test and just deleting the post-test cleanup, so you can inspect the built binaries if the test fails for some reason.

This revision was automatically updated to reflect the committed changes.

Pavel: I would vote for the same thing, if the test runs fine, nuke the directory, if it fails for any reason, leave it around so we can do post mortem. Might be nice to copy the logs over into the build directory if things fail so it is really easy to just go into the directory that contains all failed test and each log file would be right where it needs to be. Right now, you go look in the log directory, then you need to go find the build directory and put the two together.