Bug 1275674 - Mozharness script for firefox-ui tests should use 'abs_blob_upload_dir'. r=jlund, a=test-only
authorHenrik Skupin <mail@hskupin.info>
Fri, 05 Aug 2016 00:42:14 +0200
changeset 349733 65a7a3e61c3af0c22e3c2c30421d2db8443d4b72
parent 349732 a609f6015009feea8362b149ec175f63a5b14cb8
child 349734 85795b91add3b787010e6d89dc5b15b92fe8dd50
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlund, test-only
bugs1275674
milestone50.0a2
Bug 1275674 - Mozharness script for firefox-ui tests should use 'abs_blob_upload_dir'. r=jlund, a=test-only MozReview-Commit-ID: 3xKlKihoX2c
testing/mozharness/mozharness/base/python.py
testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
--- a/testing/mozharness/mozharness/base/python.py
+++ b/testing/mozharness/mozharness/base/python.py
@@ -524,16 +524,18 @@ class ResourceMonitoringMixin(object):
         # mozsystemmonitor is fixed. See bug 895388.
         try:
             self._resource_monitor.stop()
             self._log_resource_usage()
 
             # Upload a JSON file containing the raw resource data.
             try:
                 upload_dir = self.query_abs_dirs()['abs_blob_upload_dir']
+                if not os.path.exists(upload_dir):
+                    os.makedirs(upload_dir)
                 with open(os.path.join(upload_dir, 'resource-usage.json'), 'wb') as fh:
                     json.dump(self._resource_monitor.as_dict(), fh,
                               sort_keys=True, indent=4)
             except (AttributeError, KeyError):
                 self.exception('could not upload resource usage JSON',
                                level=WARNING)
 
         except Exception:
--- a/testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
+++ b/testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
@@ -165,16 +165,17 @@ class FirefoxUITests(TestingMixin, VCSTo
     def query_abs_dirs(self):
         if self.abs_dirs:
             return self.abs_dirs
 
         abs_dirs = super(FirefoxUITests, self).query_abs_dirs()
         abs_tests_install_dir = os.path.join(abs_dirs['abs_work_dir'], 'tests')
 
         dirs = {
+            'abs_blob_upload_dir': os.path.join(abs_dirs['abs_work_dir'], 'blobber_upload_dir'),
             'abs_reports_dir': os.path.join(abs_dirs['base_work_dir'], 'reports'),
             'abs_test_install_dir': abs_tests_install_dir,
             'abs_fxui_dir': os.path.join(abs_tests_install_dir, 'firefox-ui'),
         }
 
         for key in dirs:
             if key not in abs_dirs:
                 abs_dirs[key] = dirs[key]