Open Bug 1276964 Opened 5 years ago Updated 3 years ago

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

Categories

(Firefox Build System :: Mach Core, enhancement)

enhancement
Not set
normal

Tracking

(firefox49 affected)

Tracking Status
firefox49 --- affected

People

(Reporter: nbp, Unassigned)

References

Details

Running:

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

After instrumenting testing/mochitest/runtests.py 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/python27.zip
> /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/bugzil.la/1273955/commit/x64/gcc48/dbg/build

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 runtests.py file.
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.