Bug 1114725 - Supply the raw log name per-suite to avoid overwritting log files.;r=armenzg
authorChris Manchester <cmanchester@mozilla.com>
Mon, 22 Dec 2014 21:22:05 -0500 (2014-12-23)
changeset 3527 e84f832aa8f8acab9ddf93856c5542859f1755ae
parent 3526 3ae51b94a56afd027f9fe6950315c328bce21a3d
child 3528 70550db540e8c3bf2d281f022de1a1552d65a0a8
push id2746
push usercmanchester@mozilla.com
push dateThu, 08 Jan 2015 16:34:22 +0000 (2015-01-08)
reviewersarmenzg
bugs1114725
Bug 1114725 - Supply the raw log name per-suite to avoid overwritting log files.;r=armenzg
scripts/desktop_unittest.py
--- a/scripts/desktop_unittest.py
+++ b/scripts/desktop_unittest.py
@@ -269,37 +269,39 @@ class DesktopUnittest(TestingMixin, Merc
                 self.fatal("self.installer_url was found but symbols_url could \
                         not be determined")
         else:
             self.fatal("self.installer_url was not found in self.config")
         self.info("setting symbols_url as %s" % (symbols_url))
         self.symbols_url = symbols_url
         return self.symbols_url
 
-    def _query_abs_base_cmd(self, suite_category):
+    def _query_abs_base_cmd(self, suite_category, suite):
         if self.binary_path:
             c = self.config
             dirs = self.query_abs_dirs()
             run_file = c['run_file_names'][suite_category]
             base_cmd = [self.query_python_path('python'), '-u']
             base_cmd.append(os.path.join(dirs["abs_%s_dir" % suite_category], run_file))
             abs_app_dir = self.query_abs_app_dir()
             abs_res_dir = self.query_abs_res_dir()
 
             webapprt_path = os.path.join(os.path.dirname(self.binary_path),
                                          'webapprt-stub')
             if c.get('exe_suffix'):
                 webapprt_path += c['exe_suffix']
 
+            raw_log_file = os.path.join(dirs['abs_blob_upload_dir'],
+                                        '%s_raw.log' % suite)
             str_format_values = {
                 'binary_path': self.binary_path,
                 'symbols_path': self._query_symbols_url(),
                 'abs_app_dir': abs_app_dir,
                 'app_path': webapprt_path,
-                'raw_log_file': os.path.join(dirs['abs_blob_upload_dir'], 'raw_structured_logs.log')
+                'raw_log_file': raw_log_file,
             }
             # TestingMixin._download_and_extract_symbols() will set
             # self.symbols_path when downloading/extracting.
             if self.symbols_path:
                 str_format_values['symbols_path'] = self.symbols_path
 
             if c['e10s']:
                 base_cmd.append('--e10s')
@@ -487,18 +489,18 @@ class DesktopUnittest(TestingMixin, Merc
         suites = self._query_specified_suites(suite_category)
         abs_app_dir = self.query_abs_app_dir()
         abs_res_dir = self.query_abs_res_dir()
 
         if preflight_run_method:
             preflight_run_method(suites)
         if suites:
             self.info('#### Running %s suites' % suite_category)
-            abs_base_cmd = self._query_abs_base_cmd(suite_category)
             for suite in suites:
+                abs_base_cmd = self._query_abs_base_cmd(suite_category, suite)
                 cmd = abs_base_cmd[:]
                 replace_dict = {
                     'abs_app_dir': abs_app_dir,
 
                     # Mac specific, but points to abs_app_dir on other
                     # platforms.
                     'abs_res_dir': abs_res_dir,
                 }