[Speedtests] Framework broken (for Firefox OS) after latest gaiatest update



5 years ago
5 years ago


(Reporter: rwood, Assigned: rwood)


Firefox Tracking Flags

(Not tracked)



(1 attachment)



5 years ago
After the latest gaiatest update, the games benchmarking speedtests framework is broken. The following error occurs when attempting to run the tests on a device with FFOS:

python speedtests.py firefox -f conf/default -t octane-2.0 -t sunspider-1.0 -t kraken -t canvasmark --client="perfy-nexus4" --platform=ffos --cycles=30
/usr/local/lib/python2.7/dist-packages/mozrunner/utils.py:20: UserWarning: Module mozprocess was already imported from /home/speedtest/speedtests/client/mozprocess/__init__.pyc, but /usr/local/lib/python2.7/dist-packages is being added to sys.path
  import pkg_resources
/usr/local/lib/python2.7/dist-packages/mozrunner/utils.py:20: UserWarning: Module mozlog was already imported from /home/speedtest/speedtests/client/mozlog/__init__.pyc, but /usr/local/lib/python2.7/dist-packages is being added to sys.path
  import pkg_resources
/usr/local/lib/python2.7/dist-packages/mozrunner/utils.py:20: UserWarning: Module mozinfo was already imported from /home/speedtest/speedtests/client/mozinfo/__init__.pyc, but /usr/local/lib/python2.7/dist-packages is being added to sys.path
  import pkg_resources
/usr/local/lib/python2.7/dist-packages/mozrunner/utils.py:20: UserWarning: Module mozdevice was already imported from /home/speedtest/speedtests/client/mozdevice/__init__.pyc, but /usr/local/lib/python2.7/dist-packages is being added to sys.path
  import pkg_resources
Using port 46889
adbd is already running as root
Setting FirefoxOS Browser prefs...
20 KB/s (1671 bytes in 0.079s)
41 KB/s (1749 bytes in 0.041s)
Restarting b2g process...
Traceback (most recent call last):
  File "speedtests.py", line 380, in <module>
  File "speedtests.py", line 287, in main
    runner = BrowserRunner(evt, browsers, options.tests, testconfig)
  File "/home/speedtest/speedtests/client/BrowserRunner.py", line 236, in __init__
    self.browsers = BrowserRunner.browsers_by_os(platform)
  File "/home/speedtest/speedtests/client/BrowserRunner.py", line 161, in browsers_by_os
    return BrowserRunner.browsers_B2G()
  File "/home/speedtest/speedtests/client/BrowserRunner.py", line 142, in browsers_B2G
    B2GFirefoxBrowserController(os_name, 'firefox', package=None)
  File "/home/speedtest/speedtests/client/B2GBrowserControllers.py", line 186, in __init__
    super(B2GFirefoxBrowserController, self).__init__(os_name, browser_name, package, activity)
  File "/home/speedtest/speedtests/client/B2GBrowserControllers.py", line 43, in __init__
  File "/usr/local/lib/python2.7/dist-packages/gaiatest/gaia_test.py", line 720, in restart_b2g
  File "/usr/local/lib/python2.7/dist-packages/gaiatest/gaia_test.py", line 750, in stop_b2g
    self.manager.shellCheckOutput(['stop', 'b2g'])
  File "/usr/local/lib/python2.7/dist-packages/gaiatest/gaia_test.py", line 666, in manager
    raise Exception('GaiaDevice has no device manager object set.')
Exception: GaiaDevice has no device manager object set.

Comment 1

5 years ago
I believe it has to do with this change:


mdas: Can you have a quick look please? Is there something I need to change on the speedtest framework side to work with the Mixin changes?
Flags: needinfo?(mdas)

Comment 2

5 years ago
:mdas, here's where it's failing in the speedtest framework:

GaiaDevice needs you to set its device_manager using add_device_manager, which is done in gaiatest by using marionette-client's B2GTestCaseMixin. Since this BrowserController object isn't a TestCase, it shouldn't use this mixin, but we should have an easier to access b2g manager. I've raised this concern over here https://bugzilla.mozilla.org/show_bug.cgi?id=852235#c9.

In the meantime, rwood agreed to set up the device_manager in this file without using the mixin.
Flags: needinfo?(mdas)

Comment 4

5 years ago
Thanks Malini, I took your suggestion and fixed it.

Another issue, :davehunt, this change:


Broke the speedtests framework here:


I'm trying to fix it, but Dave can you have a look please? If I fix it first I will cancel the needinfo. Thanks!
Flags: needinfo?(dave.hunt)
You should be able to do:

def running(self):
    return 'browser' in gaiatest.GaiaApps(self.marionette).running_apps

You should make sure you're on the latest version of gaiatest though. The AppWindowManager changes landed on master but not v1.3 or v1.2 so you'll need the latest atoms to fallback to the previous window manager.
Flags: needinfo?(dave.hunt)

Comment 6

5 years ago
Created attachment 8349062 [details] [review]
Link to pull request

Thanks Malini and Dave. 

Ack, here's the link to the pull request. Apologies for the breakage!
Attachment #8349062 - Flags: review?(akligman)

Comment 7

5 years ago
Last Resolved: 5 years ago
Resolution: --- → FIXED


5 years ago
Attachment #8349062 - Flags: review?(akligman) → review+
You need to log in before you can comment on or make changes to this bug.