Bug 1054308 - Port Thunderbird mozmill tests to mozharness, r=Callek
☠☠ backed out by 3cfd40a2cc7e ☠ ☠
authorJoshua Cranmer <Pidgeot18@gmail.com>
Sat, 28 Feb 2015 19:54:30 -0600 (2015-03-01)
changeset 11962 8342d69fe6b7198f194ecc7793fe7a1721113527
parent 11961 fe9f5f4bbfde9f5fb890c54fb7825cb0bc8c7113
child 11963 73605107199068523928b189e2814e9a7f2bb037
child 11964 3cfd40a2cc7eeaae45da4430e47c8e7928caaa35
push id8676
push userCallek@gmail.com
push dateTue, 10 Mar 2015 19:13:35 +0000 (2015-03-10)
reviewersCallek
bugs1054308
Bug 1054308 - Port Thunderbird mozmill tests to mozharness, r=Callek
mozilla-tests/thunderbird_config.py
--- a/mozilla-tests/thunderbird_config.py
+++ b/mozilla-tests/thunderbird_config.py
@@ -131,25 +131,31 @@ XPCSHELL = [
         'use_mozharness': True,
         'script_path': 'scripts/desktop_unittest.py',
         'extra_args': ['--xpcshell-suite', 'xpcshell',
                        '--cfg', 'unittests/thunderbird_extra.py'],
         'blob_upload': True,
         'script_maxtime': 7200,
     }),
 ]
+MOZMILL = [
+    ('mozmill', {
+        'use_mozharness': True,
+        'script_path': 'scripts/desktop_unittest.py',
+        'extra_args': ['--mozmill-suite', 'mozmill',
+                       '--cfg', 'unittests/thunderbird_extra.py'],
+        'blob_upload': True,
+        'script_maxtime': 7200,
+    }),
+]
 
 # Default set of unit tests
 UNITTEST_SUITES = {
-    'opt_unittest_suites': [
-        ('mozmill', ['mozmill']),
-    ] + XPCSHELL,
-    'debug_unittest_suites': [
-        ('mozmill', ['mozmill']),
-    ] + XPCSHELL,
+    'opt_unittest_suites': MOZMILL + XPCSHELL,
+    'debug_unittest_suites': MOZMILL + XPCSHELL,
 }
 # You must define opt_unittest_suites when enable_opt_unittests is True for a
 # platform. Likewise debug_unittest_suites for enable_debug_unittests
 PLATFORM_UNITTEST_VARS = {
     'linux': {
         'product_name': 'thunderbird',
         'app_name': 'mail',
         'brand_name': 'Daily',
@@ -381,16 +387,38 @@ for platform in PLATFORMS.keys():
                         # wasn't in the list anyways
                         pass
 
 # Mac OSX signing changes in gecko 34 - bug 1117637, bug 1047584
 for name, branch in items_before(BRANCHES, 'gecko_version', 34):
   if 'macosx64' in BRANCHES[name]['platforms']:
     BRANCHES[name]['platforms']['macosx64']['mac_res_subdir'] = 'MacOS'
 
+# mozmill-on-mozharness should ride the trains
+# Replace old trains with non-mozharness code.
+# MERGE DAY (remove this code once Thunderbird no longer services Gecko 38 and lower)
+for platform in PLATFORMS.keys():
+    MOZMILL_OLD = ('mozmill', ['mozmill'])
+    for name, branch in items_before(BRANCHES, 'gecko_version', 39):
+        if platform not in branch['platforms']:
+            continue
+        for slave_platform in PLATFORMS[platform]['slave_platforms']:
+            if slave_platform not in branch['platforms'][platform]:
+                continue
+
+            for suite_type in ['opt_unittest_suites', 'debug_unittest_suites']:
+                for mozmill in MOZMILL:
+                    try:
+                        branch['platforms'][platform][slave_platform][suite_type].remove(xpcshell)
+                        if MOZMILL_OLD not in branch['platforms'][platform][slave_platform][suite_type]:
+                            branch['platforms'][platform][slave_platform][suite_type].append(MOZMILL_OLD)
+                    except ValueError:
+                        # wasn't in the list anyways
+                        pass
+
 if __name__ == "__main__":
     import sys
     import pprint
 
     args = sys.argv[1:]
 
     if len(args) > 0:
         items = dict([(b, BRANCHES[b]) for b in args])