Bug 1253618 - Support |skip-if = asan| manifest annotations in Marionette runner. r=automatedtester, a=test-only
authorMaja Frydrychowicz <mjzffr@gmail.com>
Mon, 14 Mar 2016 11:24:58 -0400
changeset 323517 cb16eda2fb439fdb14937f42f3728413953b4b79
parent 323516 92b64cbafa539c99f1d79fc395409f143a684197
child 323518 86c9fed0d41270756b8085fb5382a308ac47983d
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, test-only
bugs1253618
milestone47.0a2
Bug 1253618 - Support |skip-if = asan| manifest annotations in Marionette runner. r=automatedtester, a=test-only Obtain build info, including asan status, by looking up mozinfo.json. MozReview-Commit-ID: 8XWMGtBEbKL
testing/marionette/harness/marionette/runner/base.py
--- a/testing/marionette/harness/marionette/runner/base.py
+++ b/testing/marionette/harness/marionette/runner/base.py
@@ -27,16 +27,29 @@ from moztest.adapters.unit import Struct
 from moztest.results import TestResultCollection, TestResult, relevant_line
 import mozversion
 
 import httpd
 
 
 here = os.path.abspath(os.path.dirname(__file__))
 
+def update_mozinfo(path=None):
+    """walk up directories to find mozinfo.json and update the info"""
+
+    path = path or here
+    dirs = set()
+    while path != os.path.expanduser('~'):
+        if path in dirs:
+            break
+        dirs.add(path)
+        path = os.path.split(path)[0]
+
+    return mozinfo.find_and_update_from_json(*dirs)
+
 
 class MarionetteTest(TestResult):
 
     @property
     def test_name(self):
         if self.test_class is not None:
             return '%s.py %s.%s' % (self.test_class.split('.')[0],
                                     self.test_class,
@@ -993,16 +1006,18 @@ 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)
+            json_path = update_mozinfo(filepath)
+            self.logger.info("mozinfo updated with the following: {}".format(None))
             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: