Record the working directory for VM platform (#1804)
Towards #1803
A VM test can change the working directory for the entire process. If
this happens it will change the result for the absolute path against the
relative paths provided to the VM platform plugin.
Record `Directory.current` when the platform plugin is instantiated. Any
place where an absolute path is needed attempt to resolve against the
original working directory.
Move some top-level methods into the plugin so they can read the cached
working directory.
This only works for VM tests, since other test platforms may be instantiated
after the VM tests have started running. Impacted users can workaround
this by running VM tests separately from other platforms.
4 files changed