v8/tools/testrunner
Daniel Dromboski 8807f0ad48 [tools] More Python 3 compatibility fixes
These should all be forward/backward compatible with Python 2/Python 3.

[tools] Tweak statusfile.py for Python 3

.iteritems() does not exist in Python 3, only .items().

(While .iteritems() was meant to be an optimization over .items()
in Python 2, .items() should work fine, and it is forward/backward
compatible.)


[tools] Fix another Python 3 issue in mb.py

sys.platform used to return e.g. 'linux2', which is 'linux' plus
whatever the first digit of `uname -r` was when Python was built.
As of Python 3.3, it always returns just 'linux' for Linux OSes.
Use `sys.platform.startswith('linux')` for forward/backward
compatibility.


[tools] Make base_runner.py Python 3 compatible

dict.keys() returns a dict_keys in Python 3, whereas it
used to return a simple array. list() is forward/backward
compatible with identical results on Python 2/3 (returns array).

(Tested on Linux x64, trying to recreate NodeJS's CI workflow.)


[tools] Make tools/dev/v8gen.py work with Python 3

dict.keys() returns a dict_keys in Python 3, whereas it
used to return a simple array. list() is forward/backward
compatible with identical results on Python 2/3 (returns array).

Comparing a None-type value numerically used to result in the
None-type value always being considered "less than" the thing
it is compared to. As of Python 3, numerically comparing against
None or None-typed values results in an error. Check if a value
is truthy before numerically comparing it, for forward/backward
compatibility.

print() used to transparently decode byte strings in Python 2.
In Python 3, they must be explicitly decoded first.

(Tested on Linux 64-bit, trying to recreate NodeJS's CI workflow.)

Bug: v8:9871
Change-Id: I059bf98577a67649bbe7ec49848989d468da96b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2867270
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74369}
2021-05-05 08:24:36 +00:00
..
local [tools] More Python 3 compatibility fixes 2021-05-05 08:24:36 +00:00
objects [tools] Handle string literal export names in testcase.py 2020-10-23 17:16:10 +00:00
outproc [message] Have message testcfg extend ExpectedOutProc 2021-04-22 18:43:28 +00:00
testproc [test] Stress concurrent inlining on numfuzz 2021-05-03 06:45:13 +00:00
utils Preparing v8 to use with python3 /tools/testrunner 2019-02-19 09:23:11 +00:00
__init__.py First commit of new tools/run-tests.py 2012-09-24 09:38:46 +00:00
base_runner.py [tools] More Python 3 compatibility fixes 2021-05-05 08:24:36 +00:00
num_fuzzer.py [flags] Prepare contradictory-flags warning 2020-09-17 11:16:57 +00:00
OWNERS Use relative paths to OWNERS files 2019-08-12 13:52:52 +00:00
PRESUBMIT.py [presubmit] Clean up insensitive terms 2020-07-27 18:05:48 +00:00
standard_runner.py [test] Replace turboprop_as_toptier with always_sparkplug 2021-05-03 12:33:38 +00:00
test_config.py Introduce regenerate-expected-files for run-test 2020-03-03 18:58:24 +00:00
trycatch_loader.js [test] Properly load mjsunit.js on endurance fuzzer 2018-02-02 13:55:32 +00:00