On Fri, Jun 13, 2014 at 1:13 PM, Dan Duvall dduvall@wikimedia.org wrote:
I would like to run the phpunit tests from inside my host OS though...
I have pre-commit hook I rely on to run phpunit tests before submitting... how can I do that now?
We might be able to get that working by ensuring the includes added by mediawiki-vagrant use relative paths—in fact, after a second look, this should be considered a bug in mediawiki-vagrant. With that usage, however, you won't benefit from any of the automatic provisioning that Vagrant provides; you'll have to ensure you have all the right dependencies set up in your host OS.
A workaround that I might suggest trying first would be to make your commits from within the VM, the big downside here being that you'll have to duplicate your user-level git configuration from your host. Another workaround (albeit more complicated) might be to configure your pre-commit hook to execute the tests on the VM over ssh.
The super-easy workaround is to just create a /vagrant symlink on the host OS, pointing to the directory hosting the virtual machine. Running the tests in a different environment than the one where the system itself is running seems like a bad idea, though.