Commit bf9d6afb authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[Py3] Get tools/testrunner/local closer to Py3

This modernizes python code without breaking Py2 compat.

Ran with command:

futurize --stage1 -w tools/testrunner

and manual fixup in statusfile_unittest.py to change to update import
path and change to absolute imports (similar to pool_unittest.py)

Bug: v8:9871
Change-Id: I8851e2188ef9285f2bd57cc07e959e22e1b05f6b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2252548Reviewed-by: 's avatarTamer Tas <tmrts@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68490}
parent a6015b47
......@@ -27,12 +27,13 @@
# for py2/py3 compatibility
from __future__ import print_function
from __future__ import absolute_import
import os
import re
from variants import ALL_VARIANTS
from utils import Freeze
from .variants import ALL_VARIANTS
from .utils import Freeze
# Possible outcomes
FAIL = "FAIL"
......
......@@ -4,10 +4,17 @@
# found in the LICENSE file.
from __future__ import absolute_import
import os
import sys
import unittest
import statusfile
from utils import Freeze
TOOLS_PATH = os.path.dirname(os.path.dirname(os.path.dirname(
os.path.abspath(__file__))))
sys.path.append(TOOLS_PATH)
from testrunner.local import statusfile
from testrunner.local.utils import Freeze
TEST_VARIABLES = {
......
......@@ -223,7 +223,7 @@ class TestGenerator(object):
return self
def __next__(self):
return self.next()
return next(self)
def next(self):
return next(self._iterator)
......
......@@ -35,7 +35,7 @@ import os
import platform
import re
import subprocess
import urllib2
import urllib
### Exit codes and their meaning.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment