mirror of
https://github.com/servo/servo.git
synced 2025-06-08 08:33:26 +00:00
Add --with-asan
(#31429)
This commit is contained in:
parent
f0191c0a75
commit
8b35c4094a
5 changed files with 64 additions and 22 deletions
|
@ -304,8 +304,8 @@ class MachCommands(CommandBase):
|
|||
category='testing',
|
||||
parser=wpt.create_parser)
|
||||
@CommandBase.common_command_arguments(build_configuration=False, build_type=True)
|
||||
def test_wpt(self, build_type: BuildType, **kwargs):
|
||||
return self._test_wpt(build_type=build_type, **kwargs)
|
||||
def test_wpt(self, build_type: BuildType, with_asan=False, **kwargs):
|
||||
return self._test_wpt(build_type=build_type, with_asan=with_asan, **kwargs)
|
||||
|
||||
@Command('test-wpt-android',
|
||||
description='Run the web platform test suite in an Android emulator',
|
||||
|
@ -321,12 +321,12 @@ class MachCommands(CommandBase):
|
|||
)
|
||||
return self._test_wpt(build_type=build_type, android=True, **kwargs)
|
||||
|
||||
def _test_wpt(self, build_type: BuildType, android=False, **kwargs):
|
||||
def _test_wpt(self, build_type: BuildType, with_asan=False, android=False, **kwargs):
|
||||
if not android:
|
||||
os.environ.update(self.build_env())
|
||||
|
||||
# TODO(mrobinson): Why do we pass the wrong binary path in when running WPT on Android?
|
||||
binary_path = self.get_binary_path(build_type=build_type)
|
||||
binary_path = self.get_binary_path(build_type=build_type, asan=with_asan)
|
||||
return_value = wpt.run.run_tests(binary_path, **kwargs)
|
||||
return return_value if not kwargs["always_succeed"] else 0
|
||||
|
||||
|
@ -768,11 +768,11 @@ tests/wpt/mozilla/tests for Servo-only tests""" % reference_path)
|
|||
@CommandArgument('params', nargs='...',
|
||||
help="Command-line arguments to be passed through to Servo")
|
||||
@CommandBase.common_command_arguments(build_configuration=False, build_type=True)
|
||||
def smoketest(self, build_type: BuildType, params):
|
||||
def smoketest(self, build_type: BuildType, params, with_asan=False):
|
||||
# We pass `-f` here so that any thread panic will cause Servo to exit,
|
||||
# preventing a panic from hanging execution. This means that these kind
|
||||
# of panics won't cause timeouts on CI.
|
||||
return self.context.commands.dispatch('run', self.context, build_type=build_type,
|
||||
return self.context.commands.dispatch('run', self.context, build_type=build_type, with_asan=with_asan,
|
||||
params=params + ['-f', 'tests/html/close-on-load.html'])
|
||||
|
||||
@Command('try', description='Runs try jobs by force pushing to try branch', category='testing')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue