зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1520592 - Enable screen captures on pageload timeouts; r=davehunt
Differential Revision: https://phabricator.services.mozilla.com/D18878 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0df4cb2e19
Коммит
e9c99dfaf4
|
@ -606,11 +606,6 @@ class Output(object):
|
||||||
|
|
||||||
def output(self, test_names):
|
def output(self, test_names):
|
||||||
"""output to file and perfherder data json """
|
"""output to file and perfherder data json """
|
||||||
if self.summarized_results == {}:
|
|
||||||
LOG.error("error: no summarized raptor results found for %s" %
|
|
||||||
', '.join(test_names))
|
|
||||||
return False
|
|
||||||
|
|
||||||
if os.environ['MOZ_UPLOAD_DIR']:
|
if os.environ['MOZ_UPLOAD_DIR']:
|
||||||
# i.e. testing/mozharness/build/raptor.json locally; in production it will
|
# i.e. testing/mozharness/build/raptor.json locally; in production it will
|
||||||
# be at /tasks/task_*/build/ (where it will be picked up by mozharness later
|
# be at /tasks/task_*/build/ (where it will be picked up by mozharness later
|
||||||
|
@ -623,9 +618,13 @@ class Output(object):
|
||||||
results_path = os.path.join(os.getcwd(), 'raptor.json')
|
results_path = os.path.join(os.getcwd(), 'raptor.json')
|
||||||
screenshot_path = os.path.join(os.getcwd(), 'screenshots.html')
|
screenshot_path = os.path.join(os.getcwd(), 'screenshots.html')
|
||||||
|
|
||||||
with open(results_path, 'w') as f:
|
if self.summarized_results == {}:
|
||||||
for result in self.summarized_results:
|
LOG.error("error: no summarized raptor results found for %s" %
|
||||||
f.write("%s\n" % result)
|
', '.join(test_names))
|
||||||
|
else:
|
||||||
|
with open(results_path, 'w') as f:
|
||||||
|
for result in self.summarized_results:
|
||||||
|
f.write("%s\n" % result)
|
||||||
|
|
||||||
if len(self.summarized_screenshots) > 0:
|
if len(self.summarized_screenshots) > 0:
|
||||||
with open(screenshot_path, 'w') as f:
|
with open(screenshot_path, 'w') as f:
|
||||||
|
@ -633,6 +632,11 @@ class Output(object):
|
||||||
f.write("%s\n" % result)
|
f.write("%s\n" % result)
|
||||||
LOG.info("screen captures can be found locally at: %s" % screenshot_path)
|
LOG.info("screen captures can be found locally at: %s" % screenshot_path)
|
||||||
|
|
||||||
|
# now that we've checked for screen captures too, if there were no actual
|
||||||
|
# test results we can bail out here
|
||||||
|
if self.summarized_results == {}:
|
||||||
|
return False
|
||||||
|
|
||||||
# when gecko_profiling, we don't want results ingested by Perfherder
|
# when gecko_profiling, we don't want results ingested by Perfherder
|
||||||
extra_opts = self.summarized_results['suites'][0].get('extraOptions', [])
|
extra_opts = self.summarized_results['suites'][0].get('extraOptions', [])
|
||||||
if 'gecko_profile' not in extra_opts:
|
if 'gecko_profile' not in extra_opts:
|
||||||
|
|
|
@ -396,9 +396,13 @@ async function nextCycle() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function timeoutAlarmListener() {
|
async function timeoutAlarmListener() {
|
||||||
console.error("raptor-page-timeout on %s" % testURL);
|
console.error("raptor-page-timeout on %s" % testURL);
|
||||||
postToControlServer("raptor-page-timeout", [testName, testURL]);
|
postToControlServer("raptor-page-timeout", [testName, testURL]);
|
||||||
|
// take a screen capture
|
||||||
|
if (screenCapture) {
|
||||||
|
await getScreenCapture();
|
||||||
|
}
|
||||||
// call clean-up to shutdown gracefully
|
// call clean-up to shutdown gracefully
|
||||||
cleanUp();
|
cleanUp();
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче