Bug 1241644 - when using --spsProfile, do not upload data to graph server/perfherder; r?wlach
MozReview-Commit-ID: Fzx7s9VX9vj
--- a/testing/mozharness/mozharness/mozilla/testing/talos.py
+++ b/testing/mozharness/mozharness/mozilla/testing/talos.py
@@ -424,12 +424,13 @@ class Talos(TestingMixin, MercurialScrip
log_level = WARNING
tbpl_level = TBPL_WARNING
if self.return_code == 4:
log_level = WARNING
tbpl_level = TBPL_RETRY
parser.update_worst_log_and_tbpl_levels(log_level, tbpl_level)
else:
- self._validate_treeherder_data(parser)
+ if not self.sps_profile:
+ self._validate_treeherder_data(parser)
self.buildbot_status(parser.worst_tbpl_status,
level=parser.worst_log_level)
--- a/testing/talos/talos/config.py
+++ b/testing/talos/talos/config.py
@@ -306,19 +306,21 @@ def get_active_tests(config):
activeTests = [i for i in activeTests if i != 'damp']
return activeTests
def get_global_overrides(config):
global_overrides = {}
for key in GLOBAL_OVERRIDES:
# get global overrides for all tests
- value = config.pop(key)
+ value = config[key]
if value is not None:
global_overrides[key] = value
+ if key != 'sps_profile':
+ config.pop(key)
# add noChrome to global overrides (HACK)
noChrome = config.pop('noChrome')
if noChrome:
global_overrides['tpchrome'] = False
# HACK: currently xperf tests post results to graph server and
# we want to ensure we don't publish shutdown numbers
--- a/testing/talos/talos/output.py
+++ b/testing/talos/talos/output.py
@@ -189,17 +189,18 @@ class Output(object):
else:
raise NotImplementedError(
"%s: %s - only http://, https://, and file:// supported"
% (self.__class__.__name__, results_url)
)
# This is the output that treeherder expects to find when parsing the
# log file
- LOG.info("PERFHERDER_DATA: %s" % json.dumps(results))
+ if 'spsProfile' not in self.results.extra_options:
+ LOG.info("PERFHERDER_DATA: %s" % json.dumps(results))
if results_scheme in ('file'):
json.dump(results, file(results_path, 'w'), indent=2,
sort_keys=True)
def post(self, results, server, path, scheme, tbpl_output):
raise NotImplementedError("Abstract base class")
@classmethod
--- a/testing/talos/talos/run_tests.py
+++ b/testing/talos/talos/run_tests.py
@@ -164,33 +164,36 @@ def run_tests(config, browser_config):
date = int(time.time())
LOG.debug("using testdate: %d" % date)
LOG.debug("actual date: %d" % int(time.time()))
# results container
talos_results = TalosResults()
# results links
- if not browser_config['develop']:
+ if not browser_config['develop'] and not config['sps_profile']:
results_urls = dict(
# another hack; datazilla stands for Perfherder
# and do not require url, but a non empty dict is required...
output_urls=['local.json'],
)
else:
# local mode, output to files
results_urls = dict(output_urls=[os.path.abspath('local.json')])
httpd = setup_webserver(browser_config['webserver'])
httpd.start()
# if e10s add as extra results option
if config['e10s']:
talos_results.add_extra_option('e10s')
+ if config['sps_profile']:
+ talos_results.add_extra_option('spsProfile')
+
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)
@@ -219,17 +222,17 @@ def run_tests(config, browser_config):
LOG.suite_end()
httpd.stop()
LOG.info("Completed test suite (%s)" % timer.elapsed())
# output results
if results_urls:
talos_results.output(results_urls)
- if browser_config['develop']:
+ if browser_config['develop'] or config['sps_profile']:
print ("Thanks for running Talos locally. Results are in %s"
% (results_urls['output_urls']))
# we will stop running tests on a failed test, or we will return 0 for
# green
return 0