Bug 1253618 - Add support for |skip-if = e10s| manifest annotations in Marionette runner. r=automatedtester, a=test-only
authorMaja Frydrychowicz <mjzffr@gmail.com>
Wed, 09 Mar 2016 16:04:02 -0500
changeset 310153 92b64cbafa539c99f1d79fc395409f143a684197
parent 310152 292b1d932cf667526f32cf0c4f1e0f02b0c27bca
child 310154 cb16eda2fb439fdb14937f42f3728413953b4b79
push id9280
push userryanvm@gmail.com
push dateSat, 19 Mar 2016 16:18:21 +0000
treeherdermozilla-aurora@07ffad91cb33 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, test-only
bugs1253618
milestone47.0a2
Bug 1253618 - Add support for |skip-if = e10s| manifest annotations in Marionette runner. r=automatedtester, a=test-only MozReview-Commit-ID: ApTPQNa2R1c
testing/marionette/harness/marionette/runner/base.py
--- a/testing/marionette/harness/marionette/runner/base.py
+++ b/testing/marionette/harness/marionette/runner/base.py
@@ -548,16 +548,17 @@ class BaseMarionetteTestRunner(object):
         self.tree = tree
         self.type = type
         self.device_serial = device_serial
         self.symbols_path = symbols_path
         self.timeout = timeout
         self.socket_timeout = socket_timeout
         self._device = None
         self._capabilities = None
+        self._appinfo = None
         self._appName = None
         self.shuffle = shuffle
         self.shuffle_seed = shuffle_seed
         self.sdcard = sdcard
         self.sources = sources
         self.server_root = server_root
         self.this_chunk = this_chunk
         self.total_chunks = total_chunks
@@ -644,16 +645,33 @@ class BaseMarionetteTestRunner(object):
             return self._capabilities
 
         self.marionette.start_session()
         self._capabilities = self.marionette.session_capabilities
         self.marionette.delete_session()
         return self._capabilities
 
     @property
+    def appinfo(self):
+        if self._appinfo:
+            return self._appinfo
+
+        self.marionette.start_session()
+        with self.marionette.using_context('chrome'):
+            self._appinfo = self.marionette.execute_script("""
+            try {
+              return Services.appinfo;
+            } catch (e) {
+              return null;
+            }""")
+        self.marionette.delete_session()
+        self._appinfo = self._appinfo or {}
+        return self._appinfo
+
+    @property
     def device(self):
         if self._device:
             return self._device
 
         self._device = self.capabilities.get('device')
         return self._device
 
     @property
@@ -974,21 +992,23 @@ setReq.onerror = function() {
 
         if file_ext == '.ini':
             manifest = TestManifest()
             manifest.read(filepath)
 
             filters = []
             if self.test_tags:
                 filters.append(tags(self.test_tags))
+            e10s = self.appinfo.get('browserTabsRemoteAutostart', False)
             manifest_tests = manifest.active_tests(exists=False,
                                                    disabled=True,
                                                    filters=filters,
                                                    device=self.device,
                                                    app=self.appName,
+                                                   e10s=e10s,
                                                    **mozinfo.info)
             if len(manifest_tests) == 0:
                 self.logger.error("no tests to run using specified "
                                   "combination of filters: {}".format(
                                        manifest.fmt_filters()))
 
             unfiltered_tests = []
             for test in manifest_tests: