Re-enable junit_tests (they haven't run since june 2024).

* Fix generate_buildbot_json script (https://chromium-review.googlesource.com/c/angle/angle/+/5792035)
* Copy mixins that are removed from Chromium in mixins_webrtc.pyl
* Replace 'junit_test' by 'raw' test_type

Change-Id: Ie2642fc97c04d88e226b6c9f65b46e43942946a1
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374280
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43749}
This commit is contained in:
Jeremy Leconte 2025-01-14 11:04:51 +01:00 committed by WebRTC LUCI CQ
parent 9135a02378
commit 808c9a66cd
9 changed files with 362 additions and 139 deletions

View File

@ -430,25 +430,47 @@
"test_id_prefix": "ninja://:webrtc_nonparallel_tests/" "test_id_prefix": "ninja://:webrtc_nonparallel_tests/"
} }
], ],
"junit_tests": [ "isolated_scripts": [
{ {
"args": [ "args": [
"--shards=1" "--shards=1"
], ],
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_examples_junit_tests", "name": "android_examples_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_examples_junit_tests", "test": "android_examples_junit_tests",
"test_id_prefix": "ninja://examples:android_examples_junit_tests/" "test_id_prefix": "ninja://examples:android_examples_junit_tests/"
}, },
{ {
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_sdk_junit_tests", "name": "android_sdk_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_sdk_junit_tests", "test": "android_sdk_junit_tests",
"test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" "test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/"
} }
@ -883,25 +905,47 @@
"test_id_prefix": "ninja://:webrtc_nonparallel_tests/" "test_id_prefix": "ninja://:webrtc_nonparallel_tests/"
} }
], ],
"junit_tests": [ "isolated_scripts": [
{ {
"args": [ "args": [
"--shards=1" "--shards=1"
], ],
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_examples_junit_tests", "name": "android_examples_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_examples_junit_tests", "test": "android_examples_junit_tests",
"test_id_prefix": "ninja://examples:android_examples_junit_tests/" "test_id_prefix": "ninja://examples:android_examples_junit_tests/"
}, },
{ {
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_sdk_junit_tests", "name": "android_sdk_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_sdk_junit_tests", "test": "android_sdk_junit_tests",
"test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" "test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/"
} }
@ -1364,25 +1408,47 @@
"test_id_prefix": "ninja://:webrtc_nonparallel_tests/" "test_id_prefix": "ninja://:webrtc_nonparallel_tests/"
} }
], ],
"junit_tests": [ "isolated_scripts": [
{ {
"args": [ "args": [
"--shards=1" "--shards=1"
], ],
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_examples_junit_tests", "name": "android_examples_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_examples_junit_tests", "test": "android_examples_junit_tests",
"test_id_prefix": "ninja://examples:android_examples_junit_tests/" "test_id_prefix": "ninja://examples:android_examples_junit_tests/"
}, },
{ {
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_sdk_junit_tests", "name": "android_sdk_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_sdk_junit_tests", "test": "android_sdk_junit_tests",
"test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" "test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/"
} }
@ -1817,25 +1883,47 @@
"test_id_prefix": "ninja://:webrtc_nonparallel_tests/" "test_id_prefix": "ninja://:webrtc_nonparallel_tests/"
} }
], ],
"junit_tests": [ "isolated_scripts": [
{ {
"args": [ "args": [
"--shards=1" "--shards=1"
], ],
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_examples_junit_tests", "name": "android_examples_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_examples_junit_tests", "test": "android_examples_junit_tests",
"test_id_prefix": "ninja://examples:android_examples_junit_tests/" "test_id_prefix": "ninja://examples:android_examples_junit_tests/"
}, },
{ {
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_sdk_junit_tests", "name": "android_sdk_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_sdk_junit_tests", "test": "android_sdk_junit_tests",
"test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" "test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/"
} }
@ -7956,11 +8044,11 @@
"isolated_scripts": [ "isolated_scripts": [
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone 14", "iPhone 14",
"--version", "--version",
"17.5", "17.5",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -8005,11 +8093,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone 15", "iPhone 15",
"--version", "--version",
"18.0", "18.0",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -8054,11 +8142,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone X", "iPhone X",
"--version", "--version",
"16.4", "16.4",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -9555,11 +9643,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone 14", "iPhone 14",
"--version", "--version",
"17.5", "17.5",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -9604,11 +9692,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone 15", "iPhone 15",
"--version", "--version",
"18.0", "18.0",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -9653,11 +9741,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone X", "iPhone X",
"--version", "--version",
"16.4", "16.4",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -9702,11 +9790,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone 14", "iPhone 14",
"--version", "--version",
"17.5", "17.5",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -9751,11 +9839,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone 15", "iPhone 15",
"--version", "--version",
"18.0", "18.0",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -9800,11 +9888,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone X", "iPhone X",
"--version", "--version",
"16.4", "16.4",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",

View File

@ -17,8 +17,9 @@ import sys
_SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) _SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
_SRC_DIR = os.path.dirname(os.path.dirname(_SCRIPT_DIR)) _SRC_DIR = os.path.dirname(os.path.dirname(_SCRIPT_DIR))
_TESTING_BBOT_DIR = os.path.join(_SRC_DIR, 'testing', 'buildbot')
sys.path.insert(0, _SRC_DIR) sys.path.insert(0, _SRC_DIR)
sys.path.insert(0, os.path.join(_SRC_DIR, 'testing', 'buildbot')) sys.path.insert(0, _TESTING_BBOT_DIR)
from testing.buildbot import generate_buildbot_json from testing.buildbot import generate_buildbot_json
@ -43,10 +44,8 @@ MIXINS_PYL_TEMPLATE = """\
def generate_mixins_file_from_used_mixins(generator): def generate_mixins_file_from_used_mixins(generator):
chromium_args = generate_buildbot_json.BBJSONGenerator.parse_args(argv=None) chromium_mixins = generator.load_pyl_file(
chromium_generator = generate_buildbot_json.BBJSONGenerator(chromium_args) os.path.join(_TESTING_BBOT_DIR, 'mixins.pyl'))
chromium_generator.load_configuration_files()
seen_mixins = set() seen_mixins = set()
for waterfall in generator.waterfalls: for waterfall in generator.waterfalls:
seen_mixins = seen_mixins.union(waterfall.get('mixins', set())) seen_mixins = seen_mixins.union(waterfall.get('mixins', set()))
@ -58,16 +57,18 @@ def generate_mixins_file_from_used_mixins(generator):
if isinstance(test, list): if isinstance(test, list):
# This is for mixins defined in variants.pyl. # This is for mixins defined in variants.pyl.
for variant in test: for variant in test:
seen_mixins = seen_mixins.union(variant.get('mixins', set())) seen_mixins = seen_mixins.union(
variant.get('mixins', set()))
else: else:
seen_mixins = seen_mixins.union(test.get('mixins', set())) seen_mixins = seen_mixins.union(test.get('mixins', set()))
found_mixins = ast.literal_eval(open(WEBRTC_MIXIN_FILE_NAME).read()) found_mixins = ast.literal_eval(open(WEBRTC_MIXIN_FILE_NAME).read())
for mixin in seen_mixins: for mixin in seen_mixins:
if mixin not in found_mixins: if mixin not in found_mixins:
found_mixins[mixin] = chromium_generator.mixins[mixin] found_mixins[mixin] = chromium_mixins[mixin]
elif mixin in chromium_generator.mixins: elif mixin in chromium_mixins:
assert False, '"%s" is already defined in Chromium\'s mixins.pyl' % mixin assert False, (
'"%s" is already defined in Chromium\'s mixins.pyl' % mixin)
format_data = { format_data = {
'script_name': os.path.basename(__file__), 'script_name': os.path.basename(__file__),
@ -82,7 +83,8 @@ def generate_mixins_file_from_used_mixins(generator):
def main(): def main():
override_args = ['--pyl-files-dir', _SCRIPT_DIR] override_args = ['--pyl-files-dir', _SCRIPT_DIR]
webrtc_args = generate_buildbot_json.BBJSONGenerator.parse_args(override_args) webrtc_args = generate_buildbot_json.BBJSONGenerator.parse_args(
override_args)
webrtc_generator = generate_buildbot_json.BBJSONGenerator(webrtc_args) webrtc_generator = generate_buildbot_json.BBJSONGenerator(webrtc_args)
webrtc_generator.load_configuration_files() webrtc_generator.load_configuration_files()
webrtc_generator.resolve_configuration_files() webrtc_generator.resolve_configuration_files()

View File

@ -25,15 +25,15 @@
}, },
"android_junit_tests": { "android_junit_tests": {
"label": "//:android_junit_tests", "label": "//:android_junit_tests",
"type": "junit_test", "type": "raw",
}, },
"android_examples_junit_tests": { "android_examples_junit_tests": {
"label": "//examples:android_examples_junit_tests", "label": "//examples:android_examples_junit_tests",
"type": "junit_test", "type": "raw",
}, },
"android_sdk_junit_tests": { "android_sdk_junit_tests": {
"label": "//sdk/android:android_sdk_junit_tests", "label": "//sdk/android:android_sdk_junit_tests",
"type": "junit_test", "type": "raw",
}, },
"apprtcmobile_tests": { "apprtcmobile_tests": {
"label": "//examples:apprtcmobile_tests", "label": "//examples:apprtcmobile_tests",

View File

@ -32,6 +32,7 @@
} }
}, },
'chromium-tester-service-account': { 'chromium-tester-service-account': {
'fail_if_unused': False,
'swarming': { 'swarming': {
'service_account': 'service_account':
'chromium-tester@chops-service-accounts.iam.gserviceaccount.com' 'chromium-tester@chops-service-accounts.iam.gserviceaccount.com'
@ -129,6 +130,7 @@
} }
}, },
'linux-jammy': { 'linux-jammy': {
'fail_if_unused': False,
'swarming': { 'swarming': {
'dimensions': { 'dimensions': {
'os': 'Ubuntu-22.04' 'os': 'Ubuntu-22.04'
@ -312,6 +314,7 @@
} }
}, },
'x86-64': { 'x86-64': {
'fail_if_unused': False,
'swarming': { 'swarming': {
'dimensions': { 'dimensions': {
'cpu': 'x86-64' 'cpu': 'x86-64'

View File

@ -14,6 +14,13 @@
}, },
}, },
}, },
'arm64': {
'swarming': {
'dimensions': {
'cpu': 'arm64'
}
}
},
'cores-12': { 'cores-12': {
'swarming': { 'swarming': {
'dimensions': { 'dimensions': {
@ -57,6 +64,36 @@
}, },
}, },
}, },
'ios_runtime_cache_16_4': {
'swarming': {
'named_caches': [
{
'name': 'runtime_ios_16_4',
'path': 'Runtime-ios-16.4',
},
],
},
},
'ios_runtime_cache_17_5': {
'swarming': {
'named_caches': [
{
'name': 'runtime_ios_17_5',
'path': 'Runtime-ios-17.5',
},
],
},
},
'ios_runtime_cache_18_0': {
'swarming': {
'named_caches': [
{
'name': 'runtime_ios_18_0',
'path': 'Runtime-ios-18.0',
},
],
},
},
'limited-capacity': { 'limited-capacity': {
# Sometimes there are multiple tests that can be run only on one machine. # Sometimes there are multiple tests that can be run only on one machine.
# We need to increase timeouts so the tests dont expire before the machine is freed. # We need to increase timeouts so the tests dont expire before the machine is freed.
@ -65,6 +102,13 @@
'expiration': 10800, 'expiration': 10800,
}, },
}, },
'linux-focal': {
'swarming': {
'dimensions': {
'os': 'Ubuntu-20.04'
}
}
},
'mac-m1-cpu': { 'mac-m1-cpu': {
'swarming': { 'swarming': {
'dimensions': { 'dimensions': {
@ -72,6 +116,22 @@
} }
} }
}, },
'mac_12_arm64': {
'swarming': {
'dimensions': {
'cpu': 'arm64',
'os': 'Mac-12'
}
}
},
'mac_14_arm64': {
'swarming': {
'dimensions': {
'cpu': 'arm64',
'os': 'Mac-14'
}
}
},
'mac11': { 'mac11': {
'swarming': { 'swarming': {
'dimensions': { 'dimensions': {
@ -185,6 +245,21 @@
'io_timeout': 10800, 'io_timeout': 10800,
}, },
}, },
'walleye': {
'swarming': {
'dimensions': {
'device_type': 'walleye',
'os': 'Android'
}
}
},
'win11': {
'swarming': {
'dimensions': {
'os': 'Windows-11-22000'
}
}
},
'webrtc-xctest': { 'webrtc-xctest': {
'args': [ 'args': [
'--xctest', '--xctest',
@ -199,4 +274,21 @@
}] }]
} }
}, },
'xcode_16_main': {
'args': [
'--xcode-build-version',
'16a5230g',
],
'swarming': {
'named_caches': [
{
'name': 'xcode_ios_16a5230g',
'path': 'Xcode.app',
},
],
},
},
'xcodebuild_sim_runner': {
'args': ['--xcodebuild-sim-runner']
}
} }

View File

@ -479,25 +479,47 @@
"test_id_prefix": "ninja://:webrtc_perf_tests/" "test_id_prefix": "ninja://:webrtc_perf_tests/"
} }
], ],
"junit_tests": [ "isolated_scripts": [
{ {
"args": [ "args": [
"--shards=1" "--shards=1"
], ],
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_examples_junit_tests", "name": "android_examples_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_examples_junit_tests", "test": "android_examples_junit_tests",
"test_id_prefix": "ninja://examples:android_examples_junit_tests/" "test_id_prefix": "ninja://examples:android_examples_junit_tests/"
}, },
{ {
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_sdk_junit_tests", "name": "android_sdk_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_sdk_junit_tests", "test": "android_sdk_junit_tests",
"test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" "test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/"
} }
@ -981,25 +1003,47 @@
"test_id_prefix": "ninja://:webrtc_perf_tests/" "test_id_prefix": "ninja://:webrtc_perf_tests/"
} }
], ],
"junit_tests": [ "isolated_scripts": [
{ {
"args": [ "args": [
"--shards=1" "--shards=1"
], ],
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_examples_junit_tests", "name": "android_examples_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_examples_junit_tests", "test": "android_examples_junit_tests",
"test_id_prefix": "ninja://examples:android_examples_junit_tests/" "test_id_prefix": "ninja://examples:android_examples_junit_tests/"
}, },
{ {
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_sdk_junit_tests", "name": "android_sdk_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_sdk_junit_tests", "test": "android_sdk_junit_tests",
"test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" "test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/"
} }
@ -1483,25 +1527,47 @@
"test_id_prefix": "ninja://:webrtc_perf_tests/" "test_id_prefix": "ninja://:webrtc_perf_tests/"
} }
], ],
"junit_tests": [ "isolated_scripts": [
{ {
"args": [ "args": [
"--shards=1" "--shards=1"
], ],
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_examples_junit_tests", "name": "android_examples_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_examples_junit_tests", "test": "android_examples_junit_tests",
"test_id_prefix": "ninja://examples:android_examples_junit_tests/" "test_id_prefix": "ninja://examples:android_examples_junit_tests/"
}, },
{ {
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_sdk_junit_tests", "name": "android_sdk_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_sdk_junit_tests", "test": "android_sdk_junit_tests",
"test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" "test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/"
} }
@ -2010,25 +2076,47 @@
"test_id_prefix": "ninja://:webrtc_perf_tests/" "test_id_prefix": "ninja://:webrtc_perf_tests/"
} }
], ],
"junit_tests": [ "isolated_scripts": [
{ {
"args": [ "args": [
"--shards=1" "--shards=1"
], ],
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_examples_junit_tests", "name": "android_examples_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_examples_junit_tests", "test": "android_examples_junit_tests",
"test_id_prefix": "ninja://examples:android_examples_junit_tests/" "test_id_prefix": "ninja://examples:android_examples_junit_tests/"
}, },
{ {
"merge": {
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"name": "android_sdk_junit_tests", "name": "android_sdk_junit_tests",
"resultdb": { "resultdb": {
"enable": true, "enable": true,
"has_native_resultdb_integration": true "has_native_resultdb_integration": true
}, },
"swarming": {
"dimensions": {
"android_devices": "1",
"device_type": "walleye",
"os": "Android"
},
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "android_sdk_junit_tests", "test": "android_sdk_junit_tests",
"test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" "test_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/"
} }
@ -2318,11 +2406,11 @@
"isolated_scripts": [ "isolated_scripts": [
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone 14", "iPhone 14",
"--version", "--version",
"17.5", "17.5",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -2367,11 +2455,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone 15", "iPhone 15",
"--version", "--version",
"18.0", "18.0",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -2416,11 +2504,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone X", "iPhone X",
"--version", "--version",
"16.4", "16.4",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -3917,11 +4005,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone 14", "iPhone 14",
"--version", "--version",
"17.5", "17.5",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -3966,11 +4054,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone 15", "iPhone 15",
"--version", "--version",
"18.0", "18.0",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -4015,11 +4103,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone X", "iPhone X",
"--version", "--version",
"16.4", "16.4",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -4064,11 +4152,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone 14", "iPhone 14",
"--version", "--version",
"17.5", "17.5",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -4113,11 +4201,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone 15", "iPhone 15",
"--version", "--version",
"18.0", "18.0",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",
@ -4162,11 +4250,11 @@
}, },
{ {
"args": [ "args": [
"--xcodebuild-sim-runner",
"--platform", "--platform",
"iPhone X", "iPhone X",
"--version", "--version",
"16.4", "16.4",
"--xcodebuild-sim-runner",
"--xcode-build-version", "--xcode-build-version",
"16a5230g", "16a5230g",
"--out-dir", "--out-dir",

View File

@ -18,7 +18,7 @@
], ],
'test_suites': { 'test_suites': {
'gtest_tests': 'android_tests', 'gtest_tests': 'android_tests',
'junit_tests': 'android_junit_tests', 'isolated_scripts': 'android_junit_tests',
}, },
}, },
'Android32 (dbg)': { 'Android32 (dbg)': {
@ -28,7 +28,7 @@
], ],
'test_suites': { 'test_suites': {
'gtest_tests': 'android_tests', 'gtest_tests': 'android_tests',
'junit_tests': 'android_junit_tests', 'isolated_scripts': 'android_junit_tests',
}, },
}, },
'Android32 (more configs)': { 'Android32 (more configs)': {
@ -50,7 +50,7 @@
], ],
'test_suites': { 'test_suites': {
'gtest_tests': 'android_tests', 'gtest_tests': 'android_tests',
'junit_tests': 'android_junit_tests', 'isolated_scripts': 'android_junit_tests',
}, },
}, },
'Android64 (dbg)': { 'Android64 (dbg)': {
@ -60,7 +60,7 @@
], ],
'test_suites': { 'test_suites': {
'gtest_tests': 'android_tests', 'gtest_tests': 'android_tests',
'junit_tests': 'android_junit_tests', 'isolated_scripts': 'android_junit_tests',
}, },
}, },
'Android64 Builder arm64': {}, 'Android64 Builder arm64': {},
@ -366,7 +366,7 @@
], ],
'test_suites': { 'test_suites': {
'gtest_tests': 'android_tests_tryserver', 'gtest_tests': 'android_tests_tryserver',
'junit_tests': 'android_junit_tests', 'isolated_scripts': 'android_junit_tests',
}, },
}, },
'android_arm64_rel': { 'android_arm64_rel': {
@ -376,7 +376,7 @@
], ],
'test_suites': { 'test_suites': {
'gtest_tests': 'android_tests_tryserver', 'gtest_tests': 'android_tests_tryserver',
'junit_tests': 'android_junit_tests', 'isolated_scripts': 'android_junit_tests',
}, },
}, },
'android_arm_dbg': { 'android_arm_dbg': {
@ -386,7 +386,7 @@
], ],
'test_suites': { 'test_suites': {
'gtest_tests': 'android_tests_tryserver', 'gtest_tests': 'android_tests_tryserver',
'junit_tests': 'android_junit_tests', 'isolated_scripts': 'android_junit_tests',
}, },
}, },
'android_arm_more_configs': { 'android_arm_more_configs': {
@ -405,7 +405,7 @@
], ],
'test_suites': { 'test_suites': {
'gtest_tests': 'android_tests_tryserver', 'gtest_tests': 'android_tests_tryserver',
'junit_tests': 'android_junit_tests', 'isolated_scripts': 'android_junit_tests',
}, },
}, },
'android_compile_arm64_dbg': {}, 'android_compile_arm64_dbg': {},

View File

@ -58,33 +58,27 @@ class WebRTCMetaBuildWrapper(mb.MetaBuildWrapper):
is_linux = self.platform.startswith('linux') and not is_android is_linux = self.platform.startswith('linux') and not is_android
is_win = self.platform.startswith('win') is_win = self.platform.startswith('win')
if test_type == 'nontest':
self.WriteFailureAndRaise('We should not be isolating %s.' %
target,
output_path=None)
if test_type not in ('console_test_launcher', 'windowed_test_launcher', if test_type not in ('console_test_launcher', 'windowed_test_launcher',
'non_parallel_console_test_launcher', 'raw', 'non_parallel_console_test_launcher', 'raw',
'additional_compile_target', 'junit_test', 'additional_compile_target'):
'script'):
self.WriteFailureAndRaise('No command line for ' self.WriteFailureAndRaise('No command line for '
'%s found (test type %s).' % '%s found (test type %s).' %
(target, test_type), (target, test_type),
output_path=None) output_path=None)
cmdline = []
extra_files = [ extra_files = [
'../../.vpython3', '../../.vpython3',
'../../testing/test_env.py', '../../testing/test_env.py',
] ]
vpython_exe = 'vpython3' vpython_exe = 'vpython3'
if isolate_map[target].get('script'): if is_ios or is_fuchsia or test_type == 'raw':
cmdline += [ if is_win:
vpython_exe, cmdline = ['bin\\run_{}.bat'.format(target)]
'../../' + self.ToSrcRelPath(isolate_map[target]['script']) else:
] cmdline = ['bin/run_{}'.format(target)]
elif is_android: elif is_android:
cmdline += [ cmdline = [
'luci-auth', 'context', '--', vpython_exe, 'luci-auth', 'context', '--', vpython_exe,
'../../build/android/test_wrapper/logdog_wrapper.py', '../../build/android/test_wrapper/logdog_wrapper.py',
'--target', target, '--logdog-bin-cmd', '--target', target, '--logdog-bin-cmd',
@ -92,14 +86,10 @@ class WebRTCMetaBuildWrapper(mb.MetaBuildWrapper):
'--logcat-output-file', '${ISOLATED_OUTDIR}/logcats', '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats',
'--store-tombstones' '--store-tombstones'
] ]
elif is_ios or is_fuchsia or test_type == 'raw':
if is_win:
cmdline += ['bin\\run_{}.bat'.format(target)]
else:
cmdline += ['bin/run_{}'.format(target)]
else: else:
cmdline = []
if isolate_map[target].get('use_pipewire', False): if isolate_map[target].get('use_pipewire', False):
cmdline += [ cmdline = [
vpython_exe, '../../tools_webrtc/configure_pipewire.py' vpython_exe, '../../tools_webrtc/configure_pipewire.py'
] ]
extra_files.append('../../tools_webrtc/configure_pipewire.py') extra_files.append('../../tools_webrtc/configure_pipewire.py')

View File

@ -346,14 +346,14 @@ class UnitTest(unittest.TestCase):
'--store-tombstones', '--store-tombstones',
]) ])
def test_gen_swarming_android_junit_test(self): def test_gen_swarming_android_test(self):
test_files = { test_files = {
'/tmp/swarming_targets': '/tmp/swarming_targets':
'foo_unittests\n', 'foo_unittests\n',
'/fake_src/testing/buildbot/gn_isolate_map.pyl': '/fake_src/testing/buildbot/gn_isolate_map.pyl':
("{'foo_unittests': {" ("{'foo_unittests': {"
" 'label': '//foo:foo_unittests'," " 'label': '//foo:foo_unittests',"
" 'type': 'junit_test'," " 'type': 'console_test_launcher',"
"}}\n"), "}}\n"),
'/fake_src/out/Default/foo_unittests.runtime_deps': '/fake_src/out/Default/foo_unittests.runtime_deps':
("foo_unittests\n"), ("foo_unittests\n"),
@ -390,46 +390,6 @@ class UnitTest(unittest.TestCase):
'--store-tombstones', '--store-tombstones',
]) ])
def test_gen_script(self):
test_files = {
'/tmp/swarming_targets':
'foo_unittests_script\n',
'/fake_src/testing/buildbot/gn_isolate_map.pyl':
("{'foo_unittests_script': {"
" 'label': '//foo:foo_unittests',"
" 'type': 'script',"
" 'script': '//foo/foo_unittests_script.py',"
"}}\n"),
'/fake_src/out/Default/foo_unittests_script.runtime_deps':
("foo_unittests\n"
"foo_unittests_script.py\n"),
}
mbw = self.check([
'gen', '-c', 'debug_goma', '//out/Default',
'--swarming-targets-file', '/tmp/swarming_targets',
'--isolate-map-file',
'/fake_src/testing/buildbot/gn_isolate_map.pyl'
],
files=test_files,
ret=0)
isolate_file = (
mbw.files['/fake_src/out/Default/foo_unittests_script.isolate'])
isolate_file_contents = ast.literal_eval(isolate_file)
files = isolate_file_contents['variables']['files']
command = isolate_file_contents['variables']['command']
self.assertEqual(files, [
'../../.vpython3',
'../../testing/test_env.py',
'foo_unittests',
'foo_unittests_script.py',
])
self.assertEqual(command, [
'vpython3',
'../../foo/foo_unittests_script.py',
])
def test_gen_raw(self): def test_gen_raw(self):
test_files = { test_files = {
'/tmp/swarming_targets': '/tmp/swarming_targets':