Bug 1268622 - Talos should specify whether a run is e10s as a special property of the suite; r?jmaher draft
authorRob Wood <rwood@mozilla.com>
Tue, 10 May 2016 16:16:44 -0400
changeset 365462 4b37694fa2cce2a66a8c48ece01d6298b346eb96
parent 363286 369a5ee3a2880a4a98df3a00bf3db8d8f36b181b
child 520562 06e404c950376dcf4950c27b80e68900f6c46923
push id17746
push userrwood@mozilla.com
push dateTue, 10 May 2016 20:19:19 +0000
reviewersjmaher
bugs1268622
milestone49.0a1
Bug 1268622 - Talos should specify whether a run is e10s as a special property of the suite; r?jmaher MozReview-Commit-ID: 44T9tDqxKzC
testing/talos/talos/output.py
testing/talos/talos/results.py
testing/talos/talos/run_tests.py
--- a/testing/talos/talos/output.py
+++ b/testing/talos/talos/output.py
@@ -170,16 +170,20 @@ class PerfherderOutput(Output):
             # serialize test results
             tsresult = None
             if not test.using_xperf:
                 subtests = []
                 suite = {
                     'name': test.name(),
                     'subtests': subtests,
                 }
+
+                if self.results.extra_options:
+                    suite['extraOptions'] = self.results.extra_options
+
                 suites.append(suite)
                 vals = []
                 replicates = {}
 
                 # TODO: counters!!!! we don't have any, but they suffer the
                 # same
                 for result in test.results:
                     # XXX this will not work for manifests which list
--- a/testing/talos/talos/results.py
+++ b/testing/talos/talos/results.py
@@ -16,20 +16,24 @@ import csv
 from talos import output, utils, filter
 
 
 class TalosResults(object):
     """Container class for Talos results"""
 
     def __init__(self):
         self.results = []
+        self.extra_options = []
 
     def add(self, test_results):
         self.results.append(test_results)
 
+    def add_extra_option(self, extra_option):
+        self.extra_options.append(extra_option)
+
     def check_output_formats(self, output_formats):
         """check output formats"""
 
         # ensure formats are available
         formats = output_formats.keys()
         missing = self.check_formats_exist(formats)
         if missing:
             raise utils.TalosError("Output format(s) unknown: %s"
--- a/testing/talos/talos/run_tests.py
+++ b/testing/talos/talos/run_tests.py
@@ -170,16 +170,20 @@ def run_tests(config, browser_config):
     else:
         # local mode, output to files
         results_urls = dict(output_urls=[os.path.abspath('local.json')])
     talos_results.check_output_formats(results_urls)
 
     httpd = setup_webserver(browser_config['webserver'])
     httpd.start()
 
+    # if e10s add as extra results option
+    if config['e10s']:
+        talos_results.add_extra_option('e10s')
+
     testname = None
     # run the tests
     timer = utils.Timer()
     LOG.suite_start(tests=[test['name'] for test in tests])
     try:
         for test in tests:
             testname = test['name']
             LOG.test_start(testname)