зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1510829 - Upload AWSY artifacts even if processing fails. r=bc
It's useful to get DMD reports even if we end up with negative heap-unclassified. This catches any assertions during processing and makes sure we move the reports to the upload dir even if there's a failure. --HG-- extra : rebase_source : 3268d7b8f7f33c36c9b59bfdd5f181d80a0c4201
This commit is contained in:
Родитель
5c2dc1d41d
Коммит
0d6916073e
|
@ -80,26 +80,31 @@ class AwsyTestCase(MarionetteTestCase):
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
MarionetteTestCase.tearDown(self)
|
MarionetteTestCase.tearDown(self)
|
||||||
|
|
||||||
self.logger.info("processing data in %s!" % self._resultsDir)
|
try:
|
||||||
perf_blob = process_perf_data.create_perf_data(
|
self.logger.info("processing data in %s!" % self._resultsDir)
|
||||||
self._resultsDir, self.perf_suites(),
|
perf_blob = process_perf_data.create_perf_data(
|
||||||
self.perf_checkpoints())
|
self._resultsDir, self.perf_suites(),
|
||||||
self.logger.info("PERFHERDER_DATA: %s" % json.dumps(perf_blob))
|
self.perf_checkpoints())
|
||||||
|
self.logger.info("PERFHERDER_DATA: %s" % json.dumps(perf_blob))
|
||||||
|
|
||||||
perf_file = os.path.join(self._resultsDir, "perfherder_data.json")
|
perf_file = os.path.join(self._resultsDir, "perfherder_data.json")
|
||||||
with open(perf_file, 'w') as fp:
|
with open(perf_file, 'w') as fp:
|
||||||
json.dump(perf_blob, fp, indent=2)
|
json.dump(perf_blob, fp, indent=2)
|
||||||
self.logger.info("Perfherder data written to %s" % perf_file)
|
self.logger.info("Perfherder data written to %s" % perf_file)
|
||||||
|
except:
|
||||||
|
raise
|
||||||
|
finally:
|
||||||
|
# Make sure we cleanup and upload any existing files even if there
|
||||||
|
# were errors processing the perf data.
|
||||||
|
if self._dmd:
|
||||||
|
self.cleanup_dmd()
|
||||||
|
|
||||||
if self._dmd:
|
# copy it to moz upload dir if set
|
||||||
self.cleanup_dmd()
|
if 'MOZ_UPLOAD_DIR' in os.environ:
|
||||||
|
for file in os.listdir(self._resultsDir):
|
||||||
# copy it to moz upload dir if set
|
file = os.path.join(self._resultsDir, file)
|
||||||
if 'MOZ_UPLOAD_DIR' in os.environ:
|
if os.path.isfile(file):
|
||||||
for file in os.listdir(self._resultsDir):
|
shutil.copy2(file, os.environ["MOZ_UPLOAD_DIR"])
|
||||||
file = os.path.join(self._resultsDir, file)
|
|
||||||
if os.path.isfile(file):
|
|
||||||
shutil.copy2(file, os.environ["MOZ_UPLOAD_DIR"])
|
|
||||||
|
|
||||||
def cleanup_dmd(self):
|
def cleanup_dmd(self):
|
||||||
"""
|
"""
|
||||||
|
|
Загрузка…
Ссылка в новой задаче