Closed Bug 1175340 Opened 10 years ago Closed 10 years ago

Unable to run gaia ui tests

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: kgrandon, Unassigned)

Details

I used to have a nice script here which would run tests for me, but this no longer appears to work: https://gist.github.com/KevinGrandon/b700fc9b49cf038a4855 I see the following errors when running the script: creating virtual environment New python executable in ~/gaia/ci_venv/bin/python Installing setuptools, pip, wheel...done. run the tests! Traceback (most recent call last): File "tests/python/gaia-ui-tests/gaiatest/cli.py", line 1, in <module> from runtests import main File "!/gaia/tests/python/gaia-ui-tests/gaiatest/runtests.py", line 8, in <module> from marionette import (BaseMarionetteOptions, ImportError: No module named marionette
Also when running 'python setup.py develop', inside the gaia-ui-tests folder, I see the following stack: Installed /Users/kevin/workspace/gaia/tests/python/gaia-ui-tests Processing dependencies for gaiatest==0.33 Traceback (most recent call last): File "setup.py", line 57, in <module> install_requires=deps) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/develop.py", line 32, in run self.install_for_development() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/develop.py", line 132, in install_for_development self.process_distribution(None, self.dist, not self.no_deps) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 704, in process_distribution % e.args TypeError: not enough arguments for format string
Johan or Jonathan - would either of you guys have an idea of why this isn't working, or what tweaks I need to make to get this to work?
Flags: needinfo?(jlorenzo)
Flags: needinfo?(jgriffin)
(I can't seen to run ui tests in any fashion - is there any shortcut for running these?)
(In reply to Kevin Grandon (PTO) :kgrandon from comment #0) > creating virtual environment > New python executable in ~/gaia/ci_venv/bin/python > Installing setuptools, pip, wheel...done. > run the tests! > Traceback (most recent call last): > File "tests/python/gaia-ui-tests/gaiatest/cli.py", line 1, in <module> > from runtests import main > File "!/gaia/tests/python/gaia-ui-tests/gaiatest/runtests.py", line 8, in > <module> > from marionette import (BaseMarionetteOptions, > ImportError: No module named marionette This is likely due to the split of marionette-client into marionette-driver. I would recommend deleting your virtual environment and reinstalling using python setup.py develop. (In reply to Kevin Grandon (PTO) :kgrandon from comment #1) > Also when running 'python setup.py develop', inside the gaia-ui-tests > folder, I see the following stack: > > Installed /Users/kevin/workspace/gaia/tests/python/gaia-ui-tests > Processing dependencies for gaiatest==0.33 > Traceback (most recent call last): > File "setup.py", line 57, in <module> > install_requires=deps) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/ > core.py", line 151, in setup > dist.run_commands() > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/ > dist.py", line 953, in run_commands > self.run_command(cmd) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/ > dist.py", line 972, in run_command > cmd_obj.run() > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- > packages/setuptools/command/develop.py", line 32, in run > self.install_for_development() > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- > packages/setuptools/command/develop.py", line 132, in install_for_development > self.process_distribution(None, self.dist, not self.no_deps) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- > packages/setuptools/command/easy_install.py", line 704, in > process_distribution > % e.args > TypeError: not enough arguments for format string Perhaps try this again with a fresh virtual environment.
On my set up, I am able to: * Run the following command inside the gaia-ui-tests folder: > deactivate; rm -rf .env && virtualenv2 .env && source .env/bin/activate && python setup.py develop * Execute one test against a b2gdesktop got from http://nightly.mozilla.org/ > gaiatest --testvars=testvars.json --binary=/home/jlorenzo/Downloads/b2g/b2g-bin --profile=/home/jlorenzo/Downloads/b2g/gaia/profile --timeout=10000 gaiatest/tests/functional/contacts/test_add_photo_to_contact.py --restart When I ran your script, I got the same error as you. After taking a closer look at your script and this particular line: > Installed /Users/kevin/workspace/gaia/tests/python/gaia-ui-tests It doesn't seem you sourced the virtualenv created by venv.sh correctly, then: > source ci_venv/bin/activate # at the root of gaia Then you can run: > cd tests/python/gaia-ui-tests && python setup.py develop && cd - # You probably can execute setup.py from the gaia folder, I haven't tried, though. Once you're here, > make && ./your-script.sh works perfectly from my side. My assumption of the reason why this script was working back in the days is: either you set up the virtualenv manually back then, or you installed everything globally and there's a conflict that wasn't here.
Flags: needinfo?(jlorenzo)
Thanks for the info guys, very much appreciated. I'm just looking for an easy way to run these tests with minimal setup, will try these steps.
Flags: needinfo?(jgriffin)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.