Closed Bug 1289879 Opened 3 years ago Closed 3 years ago

Make sure mach in the interactive worker uses the test package's virtualenv

Categories

(Testing :: General, defect)

defect
Not set

Tracking

(firefox50 fixed)

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: ahal, Assigned: ahal)

References

Details

Attachments

(1 file)

I realized that the mach environment in the interactive worker wasn't using the proper virtualenv (in /home/worker/workspace/build/venv). This manifested in an ImportError: No module named 'requests'.

Even though most of the packages (except requests) are already added to sys.path by the mach bootstrap, it's definitely best if we simply re-use the virtualenv altogether.

I found the easiest way to get mach to use the virtualenv is to add /home/worker/workspace/build/venv/bin to the $PATH.
There are some packages like 'requests' that are bundled in the mozharness venv, but not in the test
package. It would be easy to manually add these to sys.path in the mach bootstrap script, but it's
much nicer to simply activate this virtualenv in the first place.

Review commit: https://reviewboard.mozilla.org/r/67850/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/67850/
Attachment #8775713 - Flags: review?(armenzg)
Comment on attachment 8775713 [details]
Bug 1289879 - Activate the mozharness virtualenv when running tests on interactive workers,

https://reviewboard.mozilla.org/r/67850/#review64872
Attachment #8775713 - Flags: review?(armenzg) → review+
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f3d6887279f8
Activate the mozharness virtualenv when running tests on interactive workers, r=armenzg
https://hg.mozilla.org/mozilla-central/rev/f3d6887279f8
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.