Commit dc0326f6 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

[ios] Force target to be dirty if xcode_version changes

The Info.plist of XCTRunner.app may change if the version of Xcode
changes, but the timestamp and the input paths may not be reliable
signals to determine whether the target is dirty.

Force the command-line of build/config/mac/plist_util.py to be
different if the version of Xcode changes. This will force ninja
to consider the target as dirty and will force using the correct
version of the binary (even if older than current output).

Bug: 1101531
Change-Id: I20f0a21c418fdd20e223390ad6c7c89063b88ae1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2302850
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789319}
parent 795f740d
......@@ -1958,6 +1958,7 @@ template("ios_xcuitest_test_runner_bundle") {
args = [
"merge",
"-f=xml1",
"-x=$xcode_version",
"-o=" + rebase_path(_output_name, root_build_dir),
] + rebase_path(sources, root_build_dir)
......
......@@ -80,7 +80,7 @@ def Interpolate(value, substitutions):
substitution.
"""
if isinstance(value, dict):
return {k: Interpolate(v, substitutions) for k, v in value.iteritems()}
return {k: Interpolate(v, substitutions) for k, v in value.iteritems()}
if isinstance(value, list):
return [Interpolate(v, substitutions) for v in value]
if isinstance(value, str):
......@@ -169,6 +169,10 @@ class MergeAction(Action):
parser.add_argument(
'-f', '--format', required=True, choices=('xml1', 'binary1', 'json'),
help='format of the plist file to generate')
parser.add_argument(
'-x',
'--xcode-version',
help='version of Xcode, ignored (can be used to force rebuild)')
parser.add_argument(
'path', nargs="+",
help='path to plist files to merge')
......@@ -201,6 +205,10 @@ class SubstituteAction(Action):
parser.add_argument(
'-f', '--format', required=True, choices=('xml1', 'binary1', 'json'),
help='format of the plist file to generate')
parser.add_argument(
'-x',
'--xcode-version',
help='version of Xcode, ignored (can be used to force rebuild)')
@staticmethod
def _Execute(args):
......
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