[v8] py3 migration of tools/predictable_wrapper.py
Migrate predictable_wrapper to py3. Run test in v8_presubmit. R=liviurau@chromium.org, machenbach@chromium.org Bug: chromium:1245634 Change-Id: I941e248ffcf12ce26a55a5f5889dab06ee74e66e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3448379 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Liviu Rau <liviurau@chromium.org> Commit-Queue: Alexander Schulze <alexschulze@chromium.org> Cr-Commit-Position: refs/heads/main@{#79200}
This commit is contained in:
parent
17536f94d6
commit
7601854ddd
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2017 the V8 project authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
@ -31,10 +31,16 @@ TIMEOUT = 120
|
||||
# Predictable mode works only when run on the host os.
|
||||
command.setup(utils.GuessOS(), None)
|
||||
|
||||
def maybe_decode(message):
|
||||
if not isinstance(message, str):
|
||||
return message.decode()
|
||||
return message
|
||||
|
||||
|
||||
def main(args):
|
||||
def allocation_str(stdout):
|
||||
for line in reversed((stdout or '').splitlines()):
|
||||
if line.startswith('### Allocations = '):
|
||||
if maybe_decode(line).startswith('### Allocations = '):
|
||||
return line
|
||||
return None
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2017 the V8 project authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2017 the V8 project authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
@ -743,6 +743,7 @@ def PyTests(workspace):
|
||||
for script in [
|
||||
join(workspace, 'tools', 'clusterfuzz', 'foozzie', 'v8_foozzie_test.py'),
|
||||
join(workspace, 'tools', 'release', 'test_scripts.py'),
|
||||
join(workspace, 'tools', 'unittests', 'predictable_wrapper_test.py'),
|
||||
join(workspace, 'tools', 'unittests', 'run_tests_test.py'),
|
||||
join(workspace, 'tools', 'unittests', 'run_perf_test.py'),
|
||||
join(workspace, 'tools', 'testrunner', 'testproc', 'variant_unittest.py'),
|
||||
|
Loading…
Reference in New Issue
Block a user