Bug 1253618 - Support |skip-if = asan| manifest annotations in Marionette runner; r?AutomatedTester draft
authorMaja Frydrychowicz <mjzffr@gmail.com>
Mon, 14 Mar 2016 11:24:58 -0400
changeset 339996 29069c94fea1ffcc6f7d194f49bbc48591952d9d
parent 339995 06b29403664e2c785488f5543aae77f76e3337ed
child 516109 be7138dac480759fb3cb7607473575acd2db9a3e
push id12867
push usermjzffr@gmail.com
push dateMon, 14 Mar 2016 17:44:05 +0000
reviewersAutomatedTester
bugs1253618
milestone48.0a1
Bug 1253618 - Support |skip-if = asan| manifest annotations in Marionette runner; r?AutomatedTester 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,
@@ -996,16 +1009,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: