Commit 85fb8df0 authored by Jeff Yoon's avatar Jeff Yoon Committed by Commit Bot

[ios/infra] move xcode-parallelization to testing/buildbot

Not all EG2 tests run with xcode-parallelization. This is an arg
that's primiarily used with simulators. Downstream, eg2 tests
are also run on devices.

Because simulators are defined in testing/buildbot, and because
the xcode-parallelization arg is bound to platform and version
(both defined by simulators), we move this arg down to testing.

* Introduced support for mixins one level above variants such that
a mixin defined here applies to all variants below.
* Removed the --xcode-parallelization arg in the GN EG2 iOS
template.
* Added xcode-parallelization for all test targets that ran
through the eg2 target upstream.

Bug: 912681
Change-Id: Ie5cb45a14be0ecbb6fb64b7c8af6eea6f49df94c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2364031
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: default avatarDirk Pranke <dpranke@google.com>
Reviewed-by: default avatarGarrett Beaty <gbeaty@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800180}
parent 99fe935f
...@@ -134,6 +134,7 @@ template("ios_test_runner_wrapper") { ...@@ -134,6 +134,7 @@ template("ios_test_runner_wrapper") {
"//testing/test_env.py", "//testing/test_env.py",
"//.vpython", "//.vpython",
"//ios/build/bots/scripts/", "//ios/build/bots/scripts/",
"//testing/test_env.py",
] ]
} }
} }
...@@ -122,10 +122,6 @@ template("ios_eg2_test") { ...@@ -122,10 +122,6 @@ template("ios_eg2_test") {
"--host-app", "--host-app",
"@WrappedPath(${_root_build_dir}/${xcode_test_application_name}.app)", "@WrappedPath(${_root_build_dir}/${xcode_test_application_name}.app)",
] ]
# All EG2 tests require xcode-parallelization. EG2 doesn't use xctest, so we
# leave undefined
executable_args += [ "--xcode-parallelization" ]
} }
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -1006,7 +1006,7 @@ class BBJSONGenerator(object): ...@@ -1006,7 +1006,7 @@ class BBJSONGenerator(object):
full_suite.update(suite) full_suite.update(suite)
compound_suites[name] = full_suite compound_suites[name] = full_suite
def resolve_variants(self, basic_test_definition, variants): def resolve_variants(self, basic_test_definition, variants, mixins):
""" Merge variant-defined configurations to each test case definition in a """ Merge variant-defined configurations to each test case definition in a
test suite. test suite.
...@@ -1044,7 +1044,7 @@ class BBJSONGenerator(object): ...@@ -1044,7 +1044,7 @@ class BBJSONGenerator(object):
cloned_config['args'] = (cloned_config.get('args', []) + cloned_config['args'] = (cloned_config.get('args', []) +
cloned_variant.get('args', [])) cloned_variant.get('args', []))
cloned_config['mixins'] = (cloned_config.get('mixins', []) + cloned_config['mixins'] = (cloned_config.get('mixins', []) +
cloned_variant.get('mixins', [])) cloned_variant.get('mixins', []) + mixins)
basic_swarming_def = cloned_config.get('swarming', {}) basic_swarming_def = cloned_config.get('swarming', {})
variant_swarming_def = cloned_variant.get('swarming', {}) variant_swarming_def = cloned_variant.get('swarming', {})
...@@ -1089,8 +1089,10 @@ class BBJSONGenerator(object): ...@@ -1089,8 +1089,10 @@ class BBJSONGenerator(object):
basic_test_def = copy.deepcopy(basic_suites[test_suite]) basic_test_def = copy.deepcopy(basic_suites[test_suite])
if 'variants' in mtx_test_suite_config: if 'variants' in mtx_test_suite_config:
mixins = mtx_test_suite_config.get('mixins', [])
result = self.resolve_variants(basic_test_def, result = self.resolve_variants(basic_test_def,
mtx_test_suite_config['variants']) mtx_test_suite_config['variants'],
mixins)
full_suite.update(result) full_suite.update(result)
matrix_compound_suites[test_name] = full_suite matrix_compound_suites[test_name] = full_suite
......
...@@ -5284,6 +5284,7 @@ MATRIX_COMPOUND_TARGETS_MIXINS = """\ ...@@ -5284,6 +5284,7 @@ MATRIX_COMPOUND_TARGETS_MIXINS = """\
'matrix_compound_suites': { 'matrix_compound_suites': {
'matrix_tests': { 'matrix_tests': {
'foo_tests': { 'foo_tests': {
'mixins': [ 'random_mixin' ],
'variants': [ 'variants': [
{ {
'identifier': 'args', 'identifier': 'args',
...@@ -5588,7 +5589,8 @@ MATRIX_TARGET_DICT_MERGE_OUTPUT_MIXINS = """\ ...@@ -5588,7 +5589,8 @@ MATRIX_TARGET_DICT_MERGE_OUTPUT_MIXINS = """\
"can_use_on_swarming_builders": true, "can_use_on_swarming_builders": true,
"value": "test" "value": "test"
}, },
"test": "mixins_test" "test": "mixins_test",
"value": "random"
}, },
{ {
"args": [], "args": [],
...@@ -5606,7 +5608,8 @@ MATRIX_TARGET_DICT_MERGE_OUTPUT_MIXINS = """\ ...@@ -5606,7 +5608,8 @@ MATRIX_TARGET_DICT_MERGE_OUTPUT_MIXINS = """\
], ],
"value": "test" "value": "test"
}, },
"test": "mixins_test" "test": "mixins_test",
"value": "random"
}, },
{ {
"args": [], "args": [],
...@@ -5625,7 +5628,8 @@ MATRIX_TARGET_DICT_MERGE_OUTPUT_MIXINS = """\ ...@@ -5625,7 +5628,8 @@ MATRIX_TARGET_DICT_MERGE_OUTPUT_MIXINS = """\
], ],
"value": "test" "value": "test"
}, },
"test": "mixins_test" "test": "mixins_test",
"value": "random"
} }
] ]
} }
......
...@@ -980,4 +980,11 @@ ...@@ -980,4 +980,11 @@
], ],
}, },
}, },
'xcode_parallelization': {
'$mixin_append': {
'args': [
'--xcode-parallelization',
],
},
},
} }
...@@ -5541,6 +5541,7 @@ ...@@ -5541,6 +5541,7 @@
], ],
}, },
'ios_eg2_tests': { 'ios_eg2_tests': {
'mixins': ['xcode_parallelization'],
'variants': [ 'variants': [
'SIM_IPHONE_X_14_0', 'SIM_IPHONE_X_14_0',
'SIM_IPHONE_7_14_0', 'SIM_IPHONE_7_14_0',
...@@ -5549,6 +5550,7 @@ ...@@ -5549,6 +5550,7 @@
] ]
}, },
'ios_eg2_cq_tests': { 'ios_eg2_cq_tests': {
'mixins': ['xcode_parallelization'],
'variants': [ 'variants': [
'SIM_IPHONE_7_14_0', 'SIM_IPHONE_7_14_0',
'SIM_IPHONE_X_14_0', 'SIM_IPHONE_X_14_0',
...@@ -5577,6 +5579,7 @@ ...@@ -5577,6 +5579,7 @@
], ],
}, },
'ios_eg2_tests': { 'ios_eg2_tests': {
'mixins': ['xcode_parallelization'],
'variants': [ 'variants': [
# 14.0 Sims # 14.0 Sims
'SIM_IPHONE_7_14_0', 'SIM_IPHONE_7_14_0',
...@@ -5593,6 +5596,7 @@ ...@@ -5593,6 +5596,7 @@
] ]
}, },
'ios_eg2_cq_tests': { 'ios_eg2_cq_tests': {
'mixins': ['xcode_parallelization'],
'variants': [ 'variants': [
# 14.0 Sims # 14.0 Sims
'SIM_IPHONE_X_14_0', 'SIM_IPHONE_X_14_0',
...@@ -5663,6 +5667,7 @@ ...@@ -5663,6 +5667,7 @@
], ],
}, },
'ios_eg2_cq_tests': { 'ios_eg2_cq_tests': {
'mixins': ['xcode_parallelization'],
'variants': [ 'variants': [
'SIM_IPHONE_6S_12_4', 'SIM_IPHONE_6S_12_4',
'SIM_IPAD_AIR_2_12_4', 'SIM_IPAD_AIR_2_12_4',
...@@ -5672,6 +5677,7 @@ ...@@ -5672,6 +5677,7 @@
], ],
}, },
'ios_eg2_tests': { 'ios_eg2_tests': {
'mixins': ['xcode_parallelization'],
'variants': [ 'variants': [
'SIM_IPAD_AIR_2_12_4', 'SIM_IPAD_AIR_2_12_4',
'SIM_IPHONE_X_12_4', 'SIM_IPHONE_X_12_4',
...@@ -5701,6 +5707,7 @@ ...@@ -5701,6 +5707,7 @@
'ios_simulator_full_configs_test': { 'ios_simulator_full_configs_test': {
'ios_eg2_tests': { 'ios_eg2_tests': {
'mixins': ['xcode_parallelization'],
'variants': [ 'variants': [
'SIM_IPAD_AIR_2_12_4', 'SIM_IPAD_AIR_2_12_4',
'SIM_IPHONE_X_12_4', 'SIM_IPHONE_X_12_4',
...@@ -5710,6 +5717,7 @@ ...@@ -5710,6 +5717,7 @@
] ]
}, },
'ios_eg2_cq_tests': { 'ios_eg2_cq_tests': {
'mixins': ['xcode_parallelization'],
'variants': [ 'variants': [
'SIM_IPAD_AIR_2_12_4', 'SIM_IPAD_AIR_2_12_4',
'SIM_IPHONE_7_13_6', 'SIM_IPHONE_7_13_6',
...@@ -5725,11 +5733,13 @@ ...@@ -5725,11 +5733,13 @@
] ]
}, },
'ios_eg2_cq_tests': { 'ios_eg2_cq_tests': {
'mixins': ['xcode_parallelization'],
'variants': [ 'variants': [
'SIM_IPAD_AIR_2_13_6', 'SIM_IPAD_AIR_2_13_6',
] ]
}, },
'ios_eg2_tests': { 'ios_eg2_tests': {
'mixins': ['xcode_parallelization'],
'variants': [ 'variants': [
'SIM_IPAD_AIR_2_13_6', 'SIM_IPAD_AIR_2_13_6',
] ]
...@@ -5749,6 +5759,7 @@ ...@@ -5749,6 +5759,7 @@
] ]
}, },
'ios_eg2_cq_tests': { 'ios_eg2_cq_tests': {
'mixins': ['xcode_parallelization'],
'variants': [ 'variants': [
'SIM_IPHONE_6S_12_4', 'SIM_IPHONE_6S_12_4',
'SIM_IPHONE_6S_13_6', 'SIM_IPHONE_6S_13_6',
...@@ -5772,12 +5783,14 @@ ...@@ -5772,12 +5783,14 @@
] ]
}, },
'ios_eg2_cq_tests': { 'ios_eg2_cq_tests': {
'mixins': ['xcode_parallelization'],
'variants': [ 'variants': [
'SIM_IPHONE_X_13_5', 'SIM_IPHONE_X_13_5',
'SIM_IPAD_AIR_2_13_5', 'SIM_IPAD_AIR_2_13_5',
] ]
}, },
'ios_eg2_tests': { 'ios_eg2_tests': {
'mixins': ['xcode_parallelization'],
'variants': [ 'variants': [
'SIM_IPHONE_X_13_5', 'SIM_IPHONE_X_13_5',
'SIM_IPAD_AIR_2_13_5', 'SIM_IPAD_AIR_2_13_5',
......
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