Bug 987147 - [tps] Re-add support for old sync authentication. r=jgriffin, a=sledru
authorHenrik Skupin <mail@hskupin.info>
Wed, 26 Mar 2014 07:30:33 +0100
changeset 192452 040149758c6572be2bd94149a364c90d13c871fc
parent 192451 5c8cea3942d2809a19318dbc63a1485b5f49b99e
child 192453 eee14ec2164785663ab63d5dd3ebe9125469f0de
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin, sledru
bugs987147
milestone30.0a2
Bug 987147 - [tps] Re-add support for old sync authentication. r=jgriffin, a=sledru
testing/tps/tps/testrunner.py
--- a/testing/tps/tps/testrunner.py
+++ b/testing/tps/tps/testrunner.py
@@ -308,19 +308,21 @@ class TPSTestRunner(object):
 
         # Make a copy of the default env variables and preferences, and update
         # them for mobile settings if needed.
         self.env = self.default_env.copy()
         self.preferences = self.default_preferences.copy()
         if self.mobile:
             self.preferences.update({'services.sync.client.type' : 'mobile'})
 
-        # If sync accounts have been chosen, disable Firefox Accounts
-        if self.config.get('auth_type', 'fx_account') != 'fx_account':
-            self.preferences.update({'services.sync.fxaccounts.enabled' : False})
+        # Set a dummy username to force the correct authentication type. For the
+        # old sync, the username is not allowed to contain a '@'.
+        dummy = {'fx_account': 'dummy@somewhere', 'sync_account': 'dummy'}
+        auth_type = self.config.get('auth_type', 'fx_account')
+        self.preferences.update({'services.sync.username': dummy[auth_type]})
 
         # Acquire a lock to make sure no other threads are running tests
         # at the same time.
         if self.rlock:
             self.rlock.acquire()
 
         try:
             # Create the Firefox runner, which will download and install the