Last modified: 2013-09-11 22:45:51 UTC
And when running as root, we'll need to export MEDIAWIKI_URL manually.
Is this bug saying Vagrant VM should be set up so tests are executed by root? Or, is it saying that is the case now, but it should not be?
Currently you need to be root (and export MEDIAWIKI_URL on shell) to be able to run the tests. This should not be the case - you should be able to run these as a normal user.
Change 71396 had a related patch set uploaded by Ori.livneh: Set RubyGems's GEM_HOME to ~/.gem in profile.d https://gerrit.wikimedia.org/r/71396
qa/browsertests's ./features/step_definitions/upload_wizard_steps.rb generates a temporary image file and tries to save it to PWD: ChunkyPNG::Image.new(Random.new.rand(255), Random.new.rand(255), Random.new.rand(255)).save file_name path = Dir.pwd + '/' + file_name It shouldn't, obviously. pwd could be anything. It's not correct to assume that it is writable by the current user.
Change 71516 had a related patch set uploaded by Ori.livneh: Use Tempfile to manage temporary test images https://gerrit.wikimedia.org/r/71516
Change 71396 merged by jenkins-bot: Set RubyGems's GEM_HOME to ~/.gem in profile.d https://gerrit.wikimedia.org/r/71396
(In reply to comment #4) > pwd could be anything. It's not correct to assume that > it is writable by the current user. What would be correct to assume that it is writable by the current user? (It should work on Linux, Mac and Windows.)
They all usually have a 'temp file location' which is writeable by everyone. https://gerrit.wikimedia.org/r/#/c/71516/ uses that.
I think Dir.tmpdir is what we need. Trying it out.
I have pushed a new patch set: https://gerrit.wikimedia.org/r/#/c/71516 It uses temp folder to store the image. It works on my Mac, testing it now on Windows and Linux.
Jenkins is busy at the moment. If this job runs without failures then the change works on Linux: https://wmf.ci.cloudbees.com/job/_debug-browsertests-template/182/
Change 71516 merged by Zfilipin: Use temp folder to manage temporary test images https://gerrit.wikimedia.org/r/71516
Chris and I paired on this. I have changed the commit so it saves the image to a temp folder. We have tested it on Mac, Windows and Linux. For Linux test run see https://wmf.ci.cloudbees.com/job/_debug-browsertests-template/188/ If this was the only thing that required root to run browser tests, you can resolve the bug. If there is something else, please let me know. The commit is here: https://gerrit.wikimedia.org/r/#/c/71516/
That should be all. Thanks very much.
[mass-moving from Tools>MediaWiki-Vagrant to separate product. See bug 54041. Filter bugmail on this comment.]