Bug 1363094 - set environment variables for minidumps for AWSY, r=jmaher.

This commit is contained in:
Bob Clary 2017-05-22 18:57:57 -07:00
parent d0e620966f
commit e6e35bafa1

View File

@ -8,16 +8,17 @@
run awsy tests in a virtualenv
"""
import copy
import json
import os
import re
import sys
import copy
# load modules from parent dir
sys.path.insert(1, os.path.dirname(sys.path[0]))
from mozharness.base.script import PreScriptAction
from mozharness.base.log import INFO, ERROR, WARNING, CRITICAL
from mozharness.base.log import INFO, ERROR
from mozharness.mozilla.testing.testbase import TestingMixin, testing_config_options
from mozharness.base.vcs.vcsbase import MercurialScript
from mozharness.mozilla.blob_upload import BlobUploadMixin, blobupload_config_options
@ -35,6 +36,10 @@ class AWSY(TestingMixin, MercurialScript, BlobUploadMixin,TooltoolMixin):
}]
] + testing_config_options + copy.deepcopy(blobupload_config_options)
error_list = [
{'regex': re.compile(r'''(TEST-UNEXPECTED|PROCESS-CRASH)'''), 'level': ERROR},
]
def __init__(self, **kwargs):
kwargs.setdefault('config_options', self.config_options)
@ -149,9 +154,14 @@ class AWSY(TestingMixin, MercurialScript, BlobUploadMixin,TooltoolMixin):
env['MOZ_UPLOAD_DIR'] = dirs['abs_blob_upload_dir']
if not os.path.isdir(env['MOZ_UPLOAD_DIR']):
self.mkdir_p(env['MOZ_UPLOAD_DIR'])
if self.query_minidump_stackwalk():
env['MINIDUMP_STACKWALK'] = self.minidump_stackwalk_path
env['MINIDUMP_SAVE_PATH'] = dirs['abs_blob_upload_dir']
env['RUST_BACKTRACE'] = '1'
env = self.query_env(partial_env=env)
parser = StructuredOutputParser(config=self.config,
log_obj=self.log_obj,
error_list=self.error_list,
strict=False)
return_code = self.run_command(command=cmd,
cwd=self.awsy_path,