summaryrefslogtreecommitdiff
path: root/chromium/build/util
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-03-12 09:13:00 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-03-16 09:58:26 +0000
commit03561cae90f1d99b5c54b1ef3be69f10e882b25e (patch)
treecc5f0958e823c044e7ae51cc0117fe51432abe5e /chromium/build/util
parentfa98118a45f7e169f8846086dc2c22c49a8ba310 (diff)
downloadqtwebengine-chromium-03561cae90f1d99b5c54b1ef3be69f10e882b25e.tar.gz
BASELINE: Update Chromium to 88.0.4324.208
Change-Id: I3ae87d23e4eff4b4a469685658740a213600c667 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/build/util')
-rw-r--r--chromium/build/util/LASTCHANGE2
-rw-r--r--chromium/build/util/LASTCHANGE.committime2
-rw-r--r--chromium/build/util/generate_wrapper.gni4
-rwxr-xr-xchromium/build/util/generate_wrapper.py59
-rw-r--r--chromium/build/util/is_python2.py9
-rw-r--r--chromium/build/util/lib/common/chrome_test_server_spawner.py5
-rw-r--r--chromium/build/util/python2_action.py9
7 files changed, 79 insertions, 11 deletions
diff --git a/chromium/build/util/LASTCHANGE b/chromium/build/util/LASTCHANGE
index 118782befce..4e379c6abfc 100644
--- a/chromium/build/util/LASTCHANGE
+++ b/chromium/build/util/LASTCHANGE
@@ -1 +1 @@
-LASTCHANGE=38a74c624ca48a6acb2a6f427998be599b504eed-refs/branch-heads/4280@{#2025}
+LASTCHANGE=1884b7e8b607ede8072319ce1bf841d628aa79bd-refs/branch-heads/4324@{#2251}
diff --git a/chromium/build/util/LASTCHANGE.committime b/chromium/build/util/LASTCHANGE.committime
index 7166c2ddb63..1f84cd4e1e7 100644
--- a/chromium/build/util/LASTCHANGE.committime
+++ b/chromium/build/util/LASTCHANGE.committime
@@ -1 +1 @@
-1610068139 \ No newline at end of file
+1614562042 \ No newline at end of file
diff --git a/chromium/build/util/generate_wrapper.gni b/chromium/build/util/generate_wrapper.gni
index 32e6d5b44d4..157c09c6137 100644
--- a/chromium/build/util/generate_wrapper.gni
+++ b/chromium/build/util/generate_wrapper.gni
@@ -92,5 +92,9 @@ template("generate_wrapper") {
"--",
]
args += _wrapped_arguments
+
+ if (defined(invoker.write_runtime_deps)) {
+ write_runtime_deps = invoker.write_runtime_deps
+ }
}
}
diff --git a/chromium/build/util/generate_wrapper.py b/chromium/build/util/generate_wrapper.py
index 7ba9fbf1d3d..a29ddf6a5bb 100755
--- a/chromium/build/util/generate_wrapper.py
+++ b/chromium/build/util/generate_wrapper.py
@@ -88,10 +88,65 @@ PY_TEMPLATE = textwrap.dedent("""\
return args
+ def FindIsolatedOutdir(raw_args):
+ outdir = None
+ i = 0
+ remaining_args = []
+ while i < len(raw_args):
+ if raw_args[i] == '--isolated-outdir' and i < len(raw_args)-1:
+ outdir = raw_args[i+1]
+ i += 2
+ elif raw_args[i].startswith('--isolated-outdir='):
+ outdir = raw_args[i][len('--isolated-outdir='):]
+ i += 1
+ else:
+ remaining_args.append(raw_args[i])
+ i += 1
+ if not outdir and 'ISOLATED_OUTDIR' in os.environ:
+ outdir = os.environ['ISOLATED_OUTDIR']
+ return outdir, remaining_args
+
+
+ def FilterIsolatedOutdirBasedArgs(outdir, args):
+ rargs = []
+ i = 0
+ while i < len(args):
+ if 'ISOLATED_OUTDIR' in args[i]:
+ if outdir:
+ # Rewrite the arg.
+ rargs.append(args[i].replace('${{ISOLATED_OUTDIR}}',
+ outdir).replace(
+ '$ISOLATED_OUTDIR', outdir))
+ i += 1
+ else:
+ # Simply drop the arg.
+ i += 1
+ elif (not outdir and
+ args[i].startswith('-') and
+ '=' not in args[i] and
+ i < len(args) - 1 and
+ 'ISOLATED_OUTDIR' in args[i+1]):
+ # Parsing this case is ambiguous; if we're given
+ # `--foo $ISOLATED_OUTDIR` we can't tell if $ISOLATED_OUTDIR
+ # is meant to be the value of foo, or if foo takes no argument
+ # and $ISOLATED_OUTDIR is the first positional arg.
+ #
+ # We assume the former will be much more common, and so we
+ # need to drop --foo and $ISOLATED_OUTDIR.
+ i += 2
+ else:
+ rargs.append(args[i])
+ i += 1
+ return rargs
+
+
def main(raw_args):
executable_path = ExpandWrappedPath('{executable_path}')
- executable_args = ExpandWrappedPaths({executable_args})
- cmd = [executable_path] + executable_args + raw_args
+ outdir, remaining_args = FindIsolatedOutdir(raw_args)
+ args = {executable_args}
+ args = FilterIsolatedOutdirBasedArgs(outdir, args)
+ executable_args = ExpandWrappedPaths(args)
+ cmd = [executable_path] + args + remaining_args
if executable_path.endswith('.py'):
cmd = [sys.executable] + cmd
return subprocess.call(cmd)
diff --git a/chromium/build/util/is_python2.py b/chromium/build/util/is_python2.py
new file mode 100644
index 00000000000..8f2f9e26345
--- /dev/null
+++ b/chromium/build/util/is_python2.py
@@ -0,0 +1,9 @@
+# Copyright 2020 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+"""Script for checking if we're running Python 2 or 3."""
+
+import subprocess
+import sys
+
+print("true" if sys.version_info.major == 2 else "false")
diff --git a/chromium/build/util/lib/common/chrome_test_server_spawner.py b/chromium/build/util/lib/common/chrome_test_server_spawner.py
index fcfc1810500..6fd63639fad 100644
--- a/chromium/build/util/lib/common/chrome_test_server_spawner.py
+++ b/chromium/build/util/lib/common/chrome_test_server_spawner.py
@@ -25,8 +25,6 @@ import urlparse
SERVER_TYPES = {
'http': '',
'ftp': '-f',
- 'tcpecho': '--tcp-echo',
- 'udpecho': '--udp-echo',
'ws': '--websocket',
}
@@ -61,9 +59,6 @@ def _GetServerTypeCommandLine(server_type):
"""
if server_type not in SERVER_TYPES:
raise NotImplementedError('Unknown server type: %s' % server_type)
- if server_type == 'udpecho':
- raise Exception('Please do not run UDP echo tests because we do not have '
- 'a UDP forwarder tool.')
return SERVER_TYPES[server_type]
diff --git a/chromium/build/util/python2_action.py b/chromium/build/util/python2_action.py
index a62d065ce13..609665b0027 100644
--- a/chromium/build/util/python2_action.py
+++ b/chromium/build/util/python2_action.py
@@ -12,8 +12,13 @@ if sys.version_info.major == 2:
exe = sys.executable
elif sys.executable.endswith('.exe'):
# If we get here, we're a Python3 executable likely running on
- # Windows, so look for the Python2 wrapper in depot_tools.
- exe = 'python.bat'
+ # Windows, so look for the Python2 wrapper in depot_tools. We
+ # can't invoke it directly because some command lines might exceed the
+ # 8K commamand line length limit in cmd.exe, but we can use it to
+ # find the underlying executable, which we can then safely call.
+ exe = subprocess.check_output(
+ ['python.bat', '-c',
+ 'import sys; print(sys.executable)']).decode('utf8').strip()
else:
# If we get here, we are a Python3 executable. Hope that we can find
# a `python2.7` in path somewhere.