mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund
--HG-- extra : commitid : 2lBxQtB3hNz extra : rebase_source : 12fcff7328d06fa2c4d79ca11e2d4ef5f4ad717c
This commit is contained in:
parent
549ce311a8
commit
c2834c6c5b
@ -133,6 +133,14 @@ class ScriptMixin(PlatformMixin):
|
|||||||
env = None
|
env = None
|
||||||
script_obj = None
|
script_obj = None
|
||||||
|
|
||||||
|
def platform_name(self):
|
||||||
|
""" Return the platform name on which the script is running on.
|
||||||
|
Returns:
|
||||||
|
None: for failure to determine the platform.
|
||||||
|
str: The name of the platform (e.g. linux64)
|
||||||
|
"""
|
||||||
|
return platform_name()
|
||||||
|
|
||||||
# Simple filesystem commands {{{2
|
# Simple filesystem commands {{{2
|
||||||
def mkdir_p(self, path, error_level=ERROR):
|
def mkdir_p(self, path, error_level=ERROR):
|
||||||
""" Create a directory if it doesn't exists.
|
""" Create a directory if it doesn't exists.
|
||||||
|
@ -13,7 +13,6 @@ import re
|
|||||||
import urllib2
|
import urllib2
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from mozharness.base.config import ReadOnlyDict, parse_config_file
|
|
||||||
from mozharness.base.errors import BaseErrorList
|
from mozharness.base.errors import BaseErrorList
|
||||||
from mozharness.base.log import FATAL, WARNING
|
from mozharness.base.log import FATAL, WARNING
|
||||||
from mozharness.base.python import (
|
from mozharness.base.python import (
|
||||||
@ -187,7 +186,7 @@ class TestingMixin(VirtualenvMixin, BuildbotMixin, ResourceMonitoringMixin,
|
|||||||
"""
|
"""
|
||||||
c = self.config
|
c = self.config
|
||||||
orig_config = copy.deepcopy(c)
|
orig_config = copy.deepcopy(c)
|
||||||
self.warning("When you use developer_config.py, we drop " \
|
self.warning("When you use developer_config.py, we drop "
|
||||||
"'read-buildbot-config' from the list of actions.")
|
"'read-buildbot-config' from the list of actions.")
|
||||||
if "read-buildbot-config" in rw_config.actions:
|
if "read-buildbot-config" in rw_config.actions:
|
||||||
rw_config.actions.remove("read-buildbot-config")
|
rw_config.actions.remove("read-buildbot-config")
|
||||||
@ -363,12 +362,12 @@ You can set this by:
|
|||||||
if self.config.get("developer_mode") and self._is_darwin():
|
if self.config.get("developer_mode") and self._is_darwin():
|
||||||
# Bug 1066700 only affects Mac users that try to run mozharness locally
|
# Bug 1066700 only affects Mac users that try to run mozharness locally
|
||||||
version = self._query_binary_version(
|
version = self._query_binary_version(
|
||||||
regex=re.compile("UnZip\ (\d+\.\d+)\ .*",re.MULTILINE),
|
regex=re.compile("UnZip\ (\d+\.\d+)\ .*", re.MULTILINE),
|
||||||
cmd=[self.query_exe('unzip'), '-v']
|
cmd=[self.query_exe('unzip'), '-v']
|
||||||
)
|
)
|
||||||
if not version >= 6:
|
if not version >= 6:
|
||||||
self.fatal("We require a more recent version of unzip to unpack our tests.zip files.\n" \
|
self.fatal("We require a more recent version of unzip to unpack our tests.zip files.\n"
|
||||||
"You are currently using version %s. Please update to at least 6.0.\n" \
|
"You are currently using version %s. Please update to at least 6.0.\n"
|
||||||
"You can visit http://www.info-zip.org/UnZip.html" % version)
|
"You can visit http://www.info-zip.org/UnZip.html" % version)
|
||||||
|
|
||||||
def _download_test_zip(self):
|
def _download_test_zip(self):
|
||||||
@ -637,51 +636,53 @@ Did you run with --create-virtualenv? Is mozinstall in virtualenv_modules?""")
|
|||||||
if self.config.get('minidump_tooltool_manifest_path'):
|
if self.config.get('minidump_tooltool_manifest_path'):
|
||||||
return self.config['minidump_tooltool_manifest_path']
|
return self.config['minidump_tooltool_manifest_path']
|
||||||
|
|
||||||
self.info('minidump tooltool manifest unknown. determining based upon platform and arch')
|
self.info('Minidump tooltool manifest unknown. Determining based upon '
|
||||||
tooltool_path = "config/tooltool-manifests/%s/releng.manifest"
|
'platform and architecture.')
|
||||||
if self._is_windows():
|
platform_name = self.platform_name()
|
||||||
# we use the same minidump binary for 32 and 64 bit windows
|
# https://dxr.mozilla.org/mozilla-central/source/testing/config/tooltool-manifests
|
||||||
return tooltool_path % 'win32'
|
TOOLTOOL_PLATFORM_DIR = {
|
||||||
elif self._is_darwin():
|
'linux': 'linux32',
|
||||||
# we only use the 64 bit binary for osx
|
'linux64': 'linux64',
|
||||||
return tooltool_path % 'macosx64'
|
'win32': 'win32',
|
||||||
elif self._is_linux():
|
'win64': 'win32',
|
||||||
if self._is_64_bit():
|
'macosx': 'macosx64'
|
||||||
return tooltool_path % 'linux64'
|
}
|
||||||
else:
|
|
||||||
return tooltool_path % 'linux32'
|
if platform_name:
|
||||||
|
tooltool_path = "config/tooltool-manifests/%s/releng.manifest" % \
|
||||||
|
TOOLTOOL_PLATFORM_DIR[platform_name]
|
||||||
|
return tooltool_path
|
||||||
else:
|
else:
|
||||||
self.fatal('could not determine minidump tooltool manifest')
|
self.fatal('We could not determine the minidump\'s filename.')
|
||||||
|
|
||||||
def query_minidump_filename(self):
|
def query_minidump_filename(self):
|
||||||
if self.config.get('minidump_stackwalk_path'):
|
if self.config.get('minidump_stackwalk_path'):
|
||||||
return self.config['minidump_stackwalk_path']
|
return self.config['minidump_stackwalk_path']
|
||||||
|
|
||||||
self.info('minidump filename unknown. determining based upon platform and arch')
|
self.info('Minidump filename unknown. Determining based upon platform '
|
||||||
minidump_filename = '%s-minidump_stackwalk'
|
'and architecture.')
|
||||||
if self._is_windows():
|
platform_name = self.platform_name()
|
||||||
# we use the same minidump binary for 32 and 64 bit windows
|
if platform_name:
|
||||||
return minidump_filename % ('win32',) + '.exe'
|
minidump_filename = '%s-minidump_stackwalk' % platform_name
|
||||||
elif self._is_darwin():
|
if platform_name in ('win32', 'win64'):
|
||||||
# we only use the 64 bit binary for osx
|
minidump_filename += '.exe'
|
||||||
return minidump_filename % ('macosx64',)
|
return minidump_filename
|
||||||
elif self._is_linux():
|
|
||||||
if self._is_64_bit():
|
|
||||||
return minidump_filename % ('linux64',)
|
|
||||||
else:
|
|
||||||
return minidump_filename % ('linux32',)
|
|
||||||
else:
|
else:
|
||||||
self.fatal('could not determine minidump filename')
|
self.fatal('We could not determine the minidump\'s filename.')
|
||||||
|
|
||||||
def query_minidump_stackwalk(self, manifest=None):
|
def query_minidump_stackwalk(self, manifest=None):
|
||||||
if self.minidump_stackwalk_path:
|
if self.minidump_stackwalk_path:
|
||||||
return self.minidump_stackwalk_path
|
return self.minidump_stackwalk_path
|
||||||
|
|
||||||
c = self.config
|
c = self.config
|
||||||
dirs = self.query_abs_dirs()
|
dirs = self.query_abs_dirs()
|
||||||
|
|
||||||
if c.get('download_minidump_stackwalk'):
|
# This is the path where we either download to or is already on the host
|
||||||
minidump_stackwalk_path = self.query_minidump_filename()
|
minidump_stackwalk_path = self.query_minidump_filename()
|
||||||
|
|
||||||
|
if not c.get('download_minidump_stackwalk'):
|
||||||
|
self.minidump_stackwalk_path = minidump_stackwalk_path
|
||||||
|
else:
|
||||||
if not manifest:
|
if not manifest:
|
||||||
tooltool_manifest_path = self.query_minidump_tooltool_manifest()
|
tooltool_manifest_path = self.query_minidump_tooltool_manifest()
|
||||||
manifest = os.path.join(dirs.get('abs_test_install_dir',
|
manifest = os.path.join(dirs.get('abs_test_install_dir',
|
||||||
|
Loading…
Reference in New Issue
Block a user