Closed Bug 1155260 Opened 9 years ago Closed 9 years ago

Unable to specify base URL for HTTP content since bug 941085

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(firefox40 fixed)

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: davehunt, Assigned: ato)

Details

(Keywords: pi-marionette-runner)

Attachments

(1 file, 1 obsolete file)

Since bug 941085 we are no longer able to specify a base URL for an HTTP server. This is required for running tests on remote devices that are unable to see content served by the machine running the test harness.

Here's the exception being thrown by our tests:

$ gaiatest --adb-host=**** --adb-port=**** --address=**** --device=f0694085 --timeout=10000 --restart --type=b2g+sanity-dsds --server-root=http://fxos-webserver/ --log-mach=- --log-html=report/index.html --log-raw=raw.log --log-tbpl=tbpl.log --log-xunit=results.xml --testvars=/tmp/config6025612177490788828tmp --testvars=/tmp/config8647344675225612023tmp --testvars=/var/lib/jenkins/jobs/flame-kk-319.b2g-inbound.tinderbox.ui.functional.sanity.bitbar/workspace/device.json --total-chunks=1 --this-chunk=1 gaiatest/tests/functional/manifest.ini
 0:00.00 LOG: MainThread INFO Results will not be posted to Treeherder. Please set the following environment variables to enable Treeherder reports: TREEHERDER_KEY, TREEHERDER_SECRET
 0:00.68 LOG: MainThread INFO starting httpd
Traceback (most recent call last):
  File "/var/lib/jenkins/jobs/flame-kk-319.b2g-inbound.tinderbox.ui.functional.sanity.bitbar/workspace/.env/bin/gaiatest", line 9, in <module>
    load_entry_point('gaiatest==0.33', 'console_scripts', 'gaiatest')()
  File "/var/lib/jenkins/jobs/flame-kk-319.b2g-inbound.tinderbox.ui.functional.sanity.bitbar/workspace/tests/python/gaia-ui-tests/gaiatest/runtests.py", line 112, in main
    cli(runner_class=GaiaTestRunner, parser_class=GaiaTestOptions)
  File "/var/lib/jenkins/jobs/flame-kk-319.b2g-inbound.tinderbox.ui.functional.sanity.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_client-0.10-py2.7.egg/marionette/runtests.py", line 37, in cli
    runner = startTestRunner(runner_class, options, tests)
  File "/var/lib/jenkins/jobs/flame-kk-319.b2g-inbound.tinderbox.ui.functional.sanity.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_client-0.10-py2.7.egg/marionette/runtests.py", line 22, in startTestRunner
    runner.run_tests(tests)
  File "/var/lib/jenkins/jobs/flame-kk-319.b2g-inbound.tinderbox.ui.functional.sanity.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_client-0.10-py2.7.egg/marionette/runner/base.py", line 767, in run_tests
    self.start_httpd(need_external_ip)
  File "/var/lib/jenkins/jobs/flame-kk-319.b2g-inbound.tinderbox.ui.functional.sanity.bitbar/workspace/tests/python/gaia-ui-tests/gaiatest/runtests.py", line 96, in start_httpd
    super(GaiaTestRunner, self).start_httpd(need_external_ip)
  File "/var/lib/jenkins/jobs/flame-kk-319.b2g-inbound.tinderbox.ui.functional.sanity.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_client-0.10-py2.7.egg/marionette/runner/base.py", line 853, in start_httpd
    self.httpd = self.create_httpd(need_external_ip)
  File "/var/lib/jenkins/jobs/flame-kk-319.b2g-inbound.tinderbox.ui.functional.sanity.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_client-0.10-py2.7.egg/marionette/runner/base.py", line 860, in create_httpd
    rv = httpd.FixtureServer(root, host=host)
  File "/var/lib/jenkins/jobs/flame-kk-319.b2g-inbound.tinderbox.ui.functional.sanity.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_client-0.10-py2.7.egg/marionette/runner/httpd.py", line 14, in __init__
    raise Exception("Server root is not a valid path: %s" % root)
Exception: Server root is not a valid path: http://fxos-webserver/

We should bump the version number of marionette-client and release a new version once this fix lands.
Thanks for triaging this.  I suppose this is the condition we need to put back in:

    else:
        self.marionette.baseurl = self.server_root
Assignee: nobody → ato
OS: Mac OS X → All
Hardware: x86 → All
Status: NEW → ASSIGNED
Attached file MozReview Request: bz://1155260/ato (obsolete) —
/r/7291 - Bug 1155260: Fix base URL override in Marionette runner

Pull down this commit:

hg pull -r 50bac65adf81e3bf075875ba2d4611a58b00383a https://reviewboard-hg.mozilla.org/gecko/
Attachment #8594696 - Flags: review?(dave.hunt)
Comment on attachment 8594696 [details]
MozReview Request: bz://1155260/ato

https://reviewboard.mozilla.org/r/7289/#review6037

Could we also bump the marionette-client package version to 0.10.1?

::: testing/marionette/client/marionette/runner/base.py
(Diff revision 1)
> +        # Gaia sets server_root and that means we shouldn't spin up our own httpd

Should this comment be moved to line 772? Also, this isn't specific to Gaia, as the server root can be set to a URL according to the base test runner. It just so happens that we only use this for Gaia currently.
Attachment #8594696 - Flags: review?(dave.hunt)
https://reviewboard.mozilla.org/r/7289/#review6039

> Should this comment be moved to line 772? Also, this isn't specific to Gaia, as the server root can be set to a URL according to the base test runner. It just so happens that we only use this for Gaia currently.

It's good to document that Gaia uses it because it doesn't use marionette_client from in-tree, which means removing the else condition won't fail any tests on try.

Also I see no point in moving it to line 772.
Comment on attachment 8594696 [details]
MozReview Request: bz://1155260/ato

https://reviewboard.mozilla.org/r/7289/#review6045

Please include the version bump so that I can perform a release of the PyPI package once this lands.
Attachment #8594696 - Flags: review+
Attachment #8594696 - Flags: review+ → review?(dave.hunt)
Comment on attachment 8594696 [details]
MozReview Request: bz://1155260/ato

/r/7291 - Bug 1155260: Fix base URL override in Marionette runner

Pull down this commit:

hg pull -r a38ef00252e3ef08d5b9422946779e182a69a2ac https://reviewboard-hg.mozilla.org/gecko/
Attachment #8594696 - Flags: review?(dave.hunt) → review+
https://hg.mozilla.org/mozilla-central/rev/489222c634bf
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Attachment #8594696 - Attachment is obsolete: true
Attachment #8620066 - Flags: review+
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: