Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge default -> production

--HG--
branch : production
  • Loading branch information...
commit c690cf2292d83e5626ebe9cf6830769b91b094de 2 parents 755a167 + 25a279b
@ahal ahal authored
View
1  configs/b2g/emulator_automation_config.py
@@ -27,4 +27,5 @@
'run-tests',
],
"download_symbols": "ondemand",
+ "download_minidump_stackwalk": True,
}
View
30 mozharness/mozilla/testing/testbase.py
@@ -66,6 +66,7 @@ class TestingMixin(VirtualenvMixin, BuildbotMixin):
test_zip_path = None
symbols_url = None
symbols_path = None
+ default_tools_repo = 'http://hg.mozilla.org/build/tools'
def query_symbols_url(self):
if self.symbols_url:
@@ -261,6 +262,35 @@ def install(self):
# TODO we'll need some error checking here
self.binary_path = self.get_output_from_command(cmd, halt_on_failure=True)
+ def install_minidump_stackwalk(self):
+ dirs = self.query_abs_dirs()
+
+ if not os.path.isdir(os.path.join(dirs['abs_work_dir'], 'tools', 'breakpad')):
+ # clone hg.m.o/build/tools
+ repos = [{
+ 'repo': self.config.get('tools_repo') or self.default_tools_repo,
+ 'vcs': 'hg',
+ 'dest': os.path.join(dirs['abs_work_dir'], "tools")
+ }]
+ self.vcs_checkout(**repos[0])
+
+ # find binary for platform/architecture
+ path = os.path.join(dirs['abs_work_dir'], 'tools', 'breakpad', '%s', 'minidump_stackwalk')
+ pltfrm = platform.platform().lower()
+ arch = platform.architecture()
+ if 'linux' in pltfrm:
+ if '64' in arch:
+ return path % 'linux64'
+ return path % 'linux'
+ if any(s in pltfrm for s in ('mac', 'osx', 'darwin')):
+ if '64' in arch:
+ return path % 'osx64'
+ return path % 'osx'
+ if 'win' in pltfrm:
+ return path % 'win32' + '.exe'
+
+ self.fatal("Could not find a minidump_stackwalk binary for this platform!")
+
def _run_cmd_checks(self, suites):
if not suites:
return
View
13 scripts/b2g_emulator_unittest.py
@@ -16,6 +16,7 @@
from mozharness.base.errors import BaseErrorList
from mozharness.base.log import ERROR
from mozharness.base.script import BaseScript
+from mozharness.base.vcs.vcsbase import VCSMixin
from mozharness.mozilla.testing.errors import LogcatErrorList
from mozharness.mozilla.testing.testbase import TestingMixin, testing_config_options
from mozharness.mozilla.testing.unittest import DesktopUnittestOutputParser, EmulatorMixin
@@ -40,7 +41,7 @@ def parse_single_line(self, line):
super(MarionetteUnittestOutputParser, self).parse_single_line(line)
-class B2GEmulatorTest(TestingMixin, TooltoolMixin, EmulatorMixin, BaseScript):
+class B2GEmulatorTest(TestingMixin, TooltoolMixin, EmulatorMixin, VCSMixin, BaseScript):
test_suites = ('reftest', 'mochitest', 'xpcshell', 'crashtest')
config_options = [
[["--type"],
@@ -152,6 +153,7 @@ def __init__(self, require_config_file=False):
self.test_url = c.get('test_url')
self.test_manifest = c.get('test_manifest')
self.busybox_path = None
+ self.minidump_stackwalk_path = None
# TODO detect required config items and fail if not set
@@ -194,6 +196,8 @@ def download_and_extract(self):
super(B2GEmulatorTest, self).download_and_extract()
dirs = self.query_abs_dirs()
self.install_emulator()
+ if self.config.get('download_minidump_stackwalk'):
+ self.minidump_stackwalk_path = self.install_minidump_stackwalk()
self.mkdir_p(dirs['abs_xre_dir'])
self._download_unzip(self.config['xre_url'],
@@ -345,6 +349,11 @@ def run_tests(self):
if suite_name == 'xpcshell':
success_codes = [0, 1]
+ env = {}
+ if self.minidump_stackwalk_path:
+ env['MINIDUMP_STACKWALK'] = self.minidump_stackwalk_path
+ env = self.query_env(partial_env=env)
+
for i in range(0, 5):
# We retry the run because sometimes installing gecko on the
# emulator can cause B2G not to restart properly - Bug 812935.
@@ -352,7 +361,7 @@ def run_tests(self):
config=self.config,
log_obj=self.log_obj,
error_list=error_list)
- return_code = self.run_command(cmd, cwd=cwd,
+ return_code = self.run_command(cmd, cwd=cwd, env=env,
output_parser=parser,
success_codes=success_codes)
if not parser.install_gecko_failed:
Please sign in to comment.
Something went wrong with that request. Please try again.