Open Bug 1276964 Opened 7 years ago Updated 8 months ago

|mach test| fails because marionette implicitly depends on setuptools.


(Firefox Build System :: Mach Core, enhancement)



(firefox49 affected)

Tracking Status
firefox49 --- affected


(Reporter: nbp, Unassigned)




$ mach test devtools/client/webaudioeditor/test/browser_wa_destroy-node-01.js

After instrumenting testing/mochitest/ as follow:

> try:
>     print "try marionette 1."
>     from marionette import Marionette
>     print "try marionette 2."
>     from marionette_driver.addons import Addons
>     print "try marionette 3."
> except ImportError as err:
>     # Marionette not needed nor supported on android
>     print "try marionette :(.  (%s)" % str(err)
>     Marionette = None

I get the following log:

> try marionette 1.
> try marionette :(.  (No module named pkg_resources)

Listing the paths in the sys.path, only show path to the source directory, the python installation path and the build directory:

> […]
> /home/nicolas/mozilla/oom-repo
> /nix/store/kvj2h1fn25ksjn75iivkqjx8jdslr7a6-python-2.7.10/lib/python2.7/site-packages
> /nix/store/kvj2h1fn25ksjn75iivkqjx8jdslr7a6-python-2.7.10/lib/
> /nix/store/kvj2h1fn25ksjn75iivkqjx8jdslr7a6-python-2.7.10/lib/python2.7
> /nix/store/kvj2h1fn25ksjn75iivkqjx8jdslr7a6-python-2.7.10/lib/python2.7/plat-linux2
> /nix/store/kvj2h1fn25ksjn75iivkqjx8jdslr7a6-python-2.7.10/lib/python2.7/lib-tk
> /nix/store/kvj2h1fn25ksjn75iivkqjx8jdslr7a6-python-2.7.10/lib/python2.7/lib-old
> /nix/store/kvj2h1fn25ksjn75iivkqjx8jdslr7a6-python-2.7.10/lib/python2.7/lib-dynload
> /home/nicolas/mozilla/_build/firefox/

This list does not contain any path to setuptools install directory.  To work-around this issue, and make this python script work.  I had to add

> sys.path.append("/nix/store/fp[…]72-python2.7-setuptools-18.0.1/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg")

in the file.
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.