diff --git a/infra/specs/client.webrtc.json b/infra/specs/client.webrtc.json index 3dd145ecc7..2b1e795680 100644 --- a/infra/specs/client.webrtc.json +++ b/infra/specs/client.webrtc.json @@ -430,25 +430,47 @@ "test_id_prefix": "ninja://:webrtc_nonparallel_tests/" } ], - "junit_tests": [ + "isolated_scripts": [ { "args": [ "--shards=1" ], + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_examples_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://examples:android_examples_junit_tests/" }, { + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_sdk_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" } @@ -883,25 +905,47 @@ "test_id_prefix": "ninja://:webrtc_nonparallel_tests/" } ], - "junit_tests": [ + "isolated_scripts": [ { "args": [ "--shards=1" ], + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_examples_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://examples:android_examples_junit_tests/" }, { + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_sdk_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" } @@ -1364,25 +1408,47 @@ "test_id_prefix": "ninja://:webrtc_nonparallel_tests/" } ], - "junit_tests": [ + "isolated_scripts": [ { "args": [ "--shards=1" ], + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_examples_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://examples:android_examples_junit_tests/" }, { + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_sdk_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" } @@ -1817,25 +1883,47 @@ "test_id_prefix": "ninja://:webrtc_nonparallel_tests/" } ], - "junit_tests": [ + "isolated_scripts": [ { "args": [ "--shards=1" ], + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_examples_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://examples:android_examples_junit_tests/" }, { + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_sdk_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" } @@ -7956,11 +8044,11 @@ "isolated_scripts": [ { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone 14", "--version", "17.5", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -8005,11 +8093,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone 15", "--version", "18.0", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -8054,11 +8142,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone X", "--version", "16.4", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -9555,11 +9643,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone 14", "--version", "17.5", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -9604,11 +9692,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone 15", "--version", "18.0", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -9653,11 +9741,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone X", "--version", "16.4", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -9702,11 +9790,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone 14", "--version", "17.5", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -9751,11 +9839,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone 15", "--version", "18.0", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -9800,11 +9888,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone X", "--version", "16.4", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", diff --git a/infra/specs/generate_buildbot_json.py b/infra/specs/generate_buildbot_json.py index 43ae366cc8..c45c4079cf 100755 --- a/infra/specs/generate_buildbot_json.py +++ b/infra/specs/generate_buildbot_json.py @@ -17,8 +17,9 @@ import sys _SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) _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, os.path.join(_SRC_DIR, 'testing', 'buildbot')) +sys.path.insert(0, _TESTING_BBOT_DIR) from testing.buildbot import generate_buildbot_json @@ -43,53 +44,54 @@ MIXINS_PYL_TEMPLATE = """\ def generate_mixins_file_from_used_mixins(generator): - chromium_args = generate_buildbot_json.BBJSONGenerator.parse_args(argv=None) - chromium_generator = generate_buildbot_json.BBJSONGenerator(chromium_args) - chromium_generator.load_configuration_files() + chromium_mixins = generator.load_pyl_file( + os.path.join(_TESTING_BBOT_DIR, 'mixins.pyl')) + seen_mixins = set() + for waterfall in generator.waterfalls: + seen_mixins = seen_mixins.union(waterfall.get('mixins', set())) + for bot_name, tester in waterfall['machines'].items(): + del bot_name + seen_mixins = seen_mixins.union(tester.get('mixins', set())) + for suite in generator.test_suites.values(): + for test in suite.values(): + if isinstance(test, list): + # This is for mixins defined in variants.pyl. + for variant in test: + seen_mixins = seen_mixins.union( + variant.get('mixins', set())) + else: + seen_mixins = seen_mixins.union(test.get('mixins', set())) - seen_mixins = set() - for waterfall in generator.waterfalls: - seen_mixins = seen_mixins.union(waterfall.get('mixins', set())) - for bot_name, tester in waterfall['machines'].items(): - del bot_name - seen_mixins = seen_mixins.union(tester.get('mixins', set())) - for suite in generator.test_suites.values(): - for test in suite.values(): - if isinstance(test, list): - # This is for mixins defined in variants.pyl. - for variant in test: - seen_mixins = seen_mixins.union(variant.get('mixins', set())) - else: - seen_mixins = seen_mixins.union(test.get('mixins', set())) + found_mixins = ast.literal_eval(open(WEBRTC_MIXIN_FILE_NAME).read()) + for mixin in seen_mixins: + if mixin not in found_mixins: + found_mixins[mixin] = chromium_mixins[mixin] + elif mixin in chromium_mixins: + assert False, ( + '"%s" is already defined in Chromium\'s mixins.pyl' % mixin) - found_mixins = ast.literal_eval(open(WEBRTC_MIXIN_FILE_NAME).read()) - for mixin in seen_mixins: - if mixin not in found_mixins: - found_mixins[mixin] = chromium_generator.mixins[mixin] - elif mixin in chromium_generator.mixins: - assert False, '"%s" is already defined in Chromium\'s mixins.pyl' % mixin + format_data = { + 'script_name': os.path.basename(__file__), + 'data_source': 'mixins_webrtc.pyl and Chromium\'s mixins.pyl', + 'mixin_data': dict(sorted(found_mixins.items())), + } + with open(MIXIN_FILE_NAME, 'w') as f: + f.write(MIXINS_PYL_TEMPLATE.format(**format_data)) - format_data = { - 'script_name': os.path.basename(__file__), - 'data_source': 'mixins_webrtc.pyl and Chromium\'s mixins.pyl', - 'mixin_data': dict(sorted(found_mixins.items())), - } - with open(MIXIN_FILE_NAME, 'w') as f: - f.write(MIXINS_PYL_TEMPLATE.format(**format_data)) - - return subprocess.call(['yapf', '-i', MIXIN_FILE_NAME]) + return subprocess.call(['yapf', '-i', MIXIN_FILE_NAME]) def main(): - override_args = ['--pyl-files-dir', _SCRIPT_DIR] - webrtc_args = generate_buildbot_json.BBJSONGenerator.parse_args(override_args) - webrtc_generator = generate_buildbot_json.BBJSONGenerator(webrtc_args) - webrtc_generator.load_configuration_files() - webrtc_generator.resolve_configuration_files() + override_args = ['--pyl-files-dir', _SCRIPT_DIR] + webrtc_args = generate_buildbot_json.BBJSONGenerator.parse_args( + override_args) + webrtc_generator = generate_buildbot_json.BBJSONGenerator(webrtc_args) + webrtc_generator.load_configuration_files() + webrtc_generator.resolve_configuration_files() - generate_mixins_file_from_used_mixins(webrtc_generator) - return webrtc_generator.main() + generate_mixins_file_from_used_mixins(webrtc_generator) + return webrtc_generator.main() if __name__ == '__main__': # pragma: no cover - sys.exit(main()) + sys.exit(main()) diff --git a/infra/specs/gn_isolate_map.pyl b/infra/specs/gn_isolate_map.pyl index 2a3cbdd7dd..4031b4d03a 100644 --- a/infra/specs/gn_isolate_map.pyl +++ b/infra/specs/gn_isolate_map.pyl @@ -25,15 +25,15 @@ }, "android_junit_tests": { "label": "//:android_junit_tests", - "type": "junit_test", + "type": "raw", }, "android_examples_junit_tests": { "label": "//examples:android_examples_junit_tests", - "type": "junit_test", + "type": "raw", }, "android_sdk_junit_tests": { "label": "//sdk/android:android_sdk_junit_tests", - "type": "junit_test", + "type": "raw", }, "apprtcmobile_tests": { "label": "//examples:apprtcmobile_tests", diff --git a/infra/specs/mixins.pyl b/infra/specs/mixins.pyl index b58931f267..8802eb7ba9 100644 --- a/infra/specs/mixins.pyl +++ b/infra/specs/mixins.pyl @@ -32,6 +32,7 @@ } }, 'chromium-tester-service-account': { + 'fail_if_unused': False, 'swarming': { 'service_account': 'chromium-tester@chops-service-accounts.iam.gserviceaccount.com' @@ -129,6 +130,7 @@ } }, 'linux-jammy': { + 'fail_if_unused': False, 'swarming': { 'dimensions': { 'os': 'Ubuntu-22.04' @@ -312,6 +314,7 @@ } }, 'x86-64': { + 'fail_if_unused': False, 'swarming': { 'dimensions': { 'cpu': 'x86-64' diff --git a/infra/specs/mixins_webrtc.pyl b/infra/specs/mixins_webrtc.pyl index d2cce238ff..719c2fb77e 100644 --- a/infra/specs/mixins_webrtc.pyl +++ b/infra/specs/mixins_webrtc.pyl @@ -14,6 +14,13 @@ }, }, }, + 'arm64': { + 'swarming': { + 'dimensions': { + 'cpu': 'arm64' + } + } + }, 'cores-12': { 'swarming': { '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': { # 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. @@ -65,6 +102,13 @@ 'expiration': 10800, }, }, + 'linux-focal': { + 'swarming': { + 'dimensions': { + 'os': 'Ubuntu-20.04' + } + } + }, 'mac-m1-cpu': { 'swarming': { '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': { 'swarming': { 'dimensions': { @@ -185,6 +245,21 @@ 'io_timeout': 10800, }, }, + 'walleye': { + 'swarming': { + 'dimensions': { + 'device_type': 'walleye', + 'os': 'Android' + } + } + }, + 'win11': { + 'swarming': { + 'dimensions': { + 'os': 'Windows-11-22000' + } + } + }, 'webrtc-xctest': { 'args': [ '--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'] + } } diff --git a/infra/specs/tryserver.webrtc.json b/infra/specs/tryserver.webrtc.json index 4f07142ac5..2bb6d1a780 100644 --- a/infra/specs/tryserver.webrtc.json +++ b/infra/specs/tryserver.webrtc.json @@ -479,25 +479,47 @@ "test_id_prefix": "ninja://:webrtc_perf_tests/" } ], - "junit_tests": [ + "isolated_scripts": [ { "args": [ "--shards=1" ], + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_examples_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://examples:android_examples_junit_tests/" }, { + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_sdk_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" } @@ -981,25 +1003,47 @@ "test_id_prefix": "ninja://:webrtc_perf_tests/" } ], - "junit_tests": [ + "isolated_scripts": [ { "args": [ "--shards=1" ], + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_examples_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://examples:android_examples_junit_tests/" }, { + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_sdk_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" } @@ -1483,25 +1527,47 @@ "test_id_prefix": "ninja://:webrtc_perf_tests/" } ], - "junit_tests": [ + "isolated_scripts": [ { "args": [ "--shards=1" ], + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_examples_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://examples:android_examples_junit_tests/" }, { + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_sdk_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" } @@ -2010,25 +2076,47 @@ "test_id_prefix": "ninja://:webrtc_perf_tests/" } ], - "junit_tests": [ + "isolated_scripts": [ { "args": [ "--shards=1" ], + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_examples_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://examples:android_examples_junit_tests/" }, { + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, "name": "android_sdk_junit_tests", "resultdb": { "enable": 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_id_prefix": "ninja://sdk/android:android_sdk_junit_tests/" } @@ -2318,11 +2406,11 @@ "isolated_scripts": [ { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone 14", "--version", "17.5", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -2367,11 +2455,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone 15", "--version", "18.0", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -2416,11 +2504,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone X", "--version", "16.4", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -3917,11 +4005,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone 14", "--version", "17.5", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -3966,11 +4054,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone 15", "--version", "18.0", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -4015,11 +4103,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone X", "--version", "16.4", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -4064,11 +4152,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone 14", "--version", "17.5", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -4113,11 +4201,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone 15", "--version", "18.0", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", @@ -4162,11 +4250,11 @@ }, { "args": [ + "--xcodebuild-sim-runner", "--platform", "iPhone X", "--version", "16.4", - "--xcodebuild-sim-runner", "--xcode-build-version", "16a5230g", "--out-dir", diff --git a/infra/specs/waterfalls.pyl b/infra/specs/waterfalls.pyl index 76f277494a..af91a13c00 100644 --- a/infra/specs/waterfalls.pyl +++ b/infra/specs/waterfalls.pyl @@ -18,7 +18,7 @@ ], 'test_suites': { 'gtest_tests': 'android_tests', - 'junit_tests': 'android_junit_tests', + 'isolated_scripts': 'android_junit_tests', }, }, 'Android32 (dbg)': { @@ -28,7 +28,7 @@ ], 'test_suites': { 'gtest_tests': 'android_tests', - 'junit_tests': 'android_junit_tests', + 'isolated_scripts': 'android_junit_tests', }, }, 'Android32 (more configs)': { @@ -50,7 +50,7 @@ ], 'test_suites': { 'gtest_tests': 'android_tests', - 'junit_tests': 'android_junit_tests', + 'isolated_scripts': 'android_junit_tests', }, }, 'Android64 (dbg)': { @@ -60,7 +60,7 @@ ], 'test_suites': { 'gtest_tests': 'android_tests', - 'junit_tests': 'android_junit_tests', + 'isolated_scripts': 'android_junit_tests', }, }, 'Android64 Builder arm64': {}, @@ -366,7 +366,7 @@ ], 'test_suites': { 'gtest_tests': 'android_tests_tryserver', - 'junit_tests': 'android_junit_tests', + 'isolated_scripts': 'android_junit_tests', }, }, 'android_arm64_rel': { @@ -376,7 +376,7 @@ ], 'test_suites': { 'gtest_tests': 'android_tests_tryserver', - 'junit_tests': 'android_junit_tests', + 'isolated_scripts': 'android_junit_tests', }, }, 'android_arm_dbg': { @@ -386,7 +386,7 @@ ], 'test_suites': { 'gtest_tests': 'android_tests_tryserver', - 'junit_tests': 'android_junit_tests', + 'isolated_scripts': 'android_junit_tests', }, }, 'android_arm_more_configs': { @@ -405,7 +405,7 @@ ], 'test_suites': { 'gtest_tests': 'android_tests_tryserver', - 'junit_tests': 'android_junit_tests', + 'isolated_scripts': 'android_junit_tests', }, }, 'android_compile_arm64_dbg': {}, diff --git a/tools_webrtc/mb/mb.py b/tools_webrtc/mb/mb.py index 9d063cb3f4..6c77b9a7d4 100755 --- a/tools_webrtc/mb/mb.py +++ b/tools_webrtc/mb/mb.py @@ -58,33 +58,27 @@ class WebRTCMetaBuildWrapper(mb.MetaBuildWrapper): is_linux = self.platform.startswith('linux') and not is_android 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', 'non_parallel_console_test_launcher', 'raw', - 'additional_compile_target', 'junit_test', - 'script'): + 'additional_compile_target'): self.WriteFailureAndRaise('No command line for ' '%s found (test type %s).' % (target, test_type), output_path=None) - cmdline = [] extra_files = [ '../../.vpython3', '../../testing/test_env.py', ] vpython_exe = 'vpython3' - if isolate_map[target].get('script'): - cmdline += [ - vpython_exe, - '../../' + self.ToSrcRelPath(isolate_map[target]['script']) - ] + if is_ios or is_fuchsia or test_type == 'raw': + if is_win: + cmdline = ['bin\\run_{}.bat'.format(target)] + else: + cmdline = ['bin/run_{}'.format(target)] elif is_android: - cmdline += [ + cmdline = [ 'luci-auth', 'context', '--', vpython_exe, '../../build/android/test_wrapper/logdog_wrapper.py', '--target', target, '--logdog-bin-cmd', @@ -92,14 +86,10 @@ class WebRTCMetaBuildWrapper(mb.MetaBuildWrapper): '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats', '--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: + cmdline = [] if isolate_map[target].get('use_pipewire', False): - cmdline += [ + cmdline = [ vpython_exe, '../../tools_webrtc/configure_pipewire.py' ] extra_files.append('../../tools_webrtc/configure_pipewire.py') diff --git a/tools_webrtc/mb/mb_unittest.py b/tools_webrtc/mb/mb_unittest.py index f0ddb2ebe2..9e7f1ab07d 100755 --- a/tools_webrtc/mb/mb_unittest.py +++ b/tools_webrtc/mb/mb_unittest.py @@ -346,14 +346,14 @@ class UnitTest(unittest.TestCase): '--store-tombstones', ]) - def test_gen_swarming_android_junit_test(self): + def test_gen_swarming_android_test(self): test_files = { '/tmp/swarming_targets': 'foo_unittests\n', '/fake_src/testing/buildbot/gn_isolate_map.pyl': ("{'foo_unittests': {" " 'label': '//foo:foo_unittests'," - " 'type': 'junit_test'," + " 'type': 'console_test_launcher'," "}}\n"), '/fake_src/out/Default/foo_unittests.runtime_deps': ("foo_unittests\n"), @@ -390,46 +390,6 @@ class UnitTest(unittest.TestCase): '--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): test_files = { '/tmp/swarming_targets':