From 737dc4455c12325346162b9f488a346dd9df1de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Terelius?= Date: Fri, 2 Dec 2022 16:00:43 +0100 Subject: [PATCH] Add new linux code coverage bot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: b/236797073 Change-Id: I7acd8cbe12c1fe7455db337515178e28dffda523 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285940 Reviewed-by: Jeremy Leconte Commit-Queue: Björn Terelius Cr-Commit-Position: refs/heads/main@{#38804} --- infra/config/config.star | 2 + infra/config/cr-buildbucket.cfg | 47 +++ infra/config/luci-milo.cfg | 3 + infra/config/luci-notify.cfg | 13 + infra/specs/mixins.pyl | 3 + infra/specs/tryserver.webrtc.json | 526 ++++++++++++++++++++++++++++++ infra/specs/waterfalls.pyl | 11 + tools_webrtc/mb/mb_config.pyl | 6 + 8 files changed, 611 insertions(+) diff --git a/infra/config/config.star b/infra/config/config.star index c94bd5a0eb..1c6024250a 100755 --- a/infra/config/config.star +++ b/infra/config/config.star @@ -787,6 +787,8 @@ linux_builder("Linux (more configs)", "Linux|x64|more") linux_try_job("linux_more_configs") linux_try_job("linux_chromium_compile", recipe = "chromium_trybot", branch_cq = False) linux_try_job("linux_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False) +linux_try_job("linux_coverage", cq = None) + linux_builder("Fuchsia Builder", ci_cat = None, perf_cat = "Fuchsia|x64|Builder|", prioritized = True) linux_builder("Fuchsia Release", "Fuchsia|x64|rel") linux_try_job("fuchsia_rel", cq = None) diff --git a/infra/config/cr-buildbucket.cfg b/infra/config/cr-buildbucket.cfg index 25f894c9e1..e9829614e4 100644 --- a/infra/config/cr-buildbucket.cfg +++ b/infra/config/cr-buildbucket.cfg @@ -4622,6 +4622,53 @@ buckets { } } } + builders { + name: "linux_coverage" + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cpu:x86-64" + dimensions: "inside_docker:0" + dimensions: "os:Linux" + dimensions: "pool:luci.webrtc.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + cmd: "luciexe" + } + properties: + '{' + ' "$build/goma": {' + ' "server_host": "goma.chromium.org",' + ' "use_luci_auth": true' + ' },' + ' "$recipe_engine/resultdb/test_presentation": {' + ' "column_keys": [],' + ' "grouping_keys": [' + ' "status",' + ' "v.test_suite"' + ' ]' + ' },' + ' "builder_group": "tryserver.webrtc",' + ' "recipe": "webrtc/standalone"' + '}' + priority: 30 + execution_timeout_secs: 7200 + build_numbers: YES + service_account: "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com" + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "webrtc-ci" + dataset: "resultdb" + table: "try_test_results" + test_results {} + } + } + } builders { name: "linux_dbg" swarming_host: "chromium-swarm.appspot.com" diff --git a/infra/config/luci-milo.cfg b/infra/config/luci-milo.cfg index b7bffacae6..08bf4fb76e 100644 --- a/infra/config/luci-milo.cfg +++ b/infra/config/luci-milo.cfg @@ -573,6 +573,9 @@ consoles { builders { name: "buildbucket/luci.webrtc.try/linux_chromium_compile_dbg" } + builders { + name: "buildbucket/luci.webrtc.try/linux_coverage" + } builders { name: "buildbucket/luci.webrtc.try/fuchsia_rel" } diff --git a/infra/config/luci-notify.cfg b/infra/config/luci-notify.cfg index 39edcd9bdf..c4fb2aa1d7 100644 --- a/infra/config/luci-notify.cfg +++ b/infra/config/luci-notify.cfg @@ -1937,6 +1937,19 @@ notifiers { name: "linux_compile_rel" } } +notifiers { + notifications { + on_new_status: INFRA_FAILURE + email { + recipients: "webrtc-troopers-robots@google.com" + } + template: "infra_failure" + } + builders { + bucket: "try" + name: "linux_coverage" + } +} notifiers { notifications { on_new_status: INFRA_FAILURE diff --git a/infra/specs/mixins.pyl b/infra/specs/mixins.pyl index 20f342ac34..2f11efd3f8 100644 --- a/infra/specs/mixins.pyl +++ b/infra/specs/mixins.pyl @@ -124,6 +124,9 @@ } } }, + 'isolate_profile_data': { + 'isolate_profile_data': True + }, 'linux-bionic': { 'swarming': { 'dimensions': { diff --git a/infra/specs/tryserver.webrtc.json b/infra/specs/tryserver.webrtc.json index 88083980d0..29d4fa1d63 100644 --- a/infra/specs/tryserver.webrtc.json +++ b/infra/specs/tryserver.webrtc.json @@ -5855,6 +5855,532 @@ "linux_compile_arm_rel": {}, "linux_compile_dbg": {}, "linux_compile_rel": {}, + "linux_coverage": { + "isolated_scripts": [ + { + "isolate_name": "audio_decoder_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "audio_decoder_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://modules/audio_coding:audio_decoder_unittests/" + }, + { + "isolate_name": "common_audio_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "common_audio_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://common_audio:common_audio_unittests/" + }, + { + "isolate_name": "common_video_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "common_video_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://common_video:common_video_unittests/" + }, + { + "isolate_name": "dcsctp_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "dcsctp_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://net/dcsctp:dcsctp_unittests/" + }, + { + "args": [ + "--quick" + ], + "isolate_name": "low_bandwidth_audio_test", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "low_bandwidth_audio_test", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://audio:low_bandwidth_audio_test/" + }, + { + "isolate_name": "modules_tests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "modules_tests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ], + "shards": 2 + }, + "test_id_prefix": "ninja://modules:modules_tests/" + }, + { + "isolate_name": "modules_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "modules_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ], + "shards": 6 + }, + "test_id_prefix": "ninja://modules:modules_unittests/" + }, + { + "isolate_name": "peerconnection_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "peerconnection_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ], + "shards": 4 + }, + "test_id_prefix": "ninja://pc:peerconnection_unittests/" + }, + { + "isolate_name": "rtc_media_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "rtc_media_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://media:rtc_media_unittests/" + }, + { + "isolate_name": "rtc_pc_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "rtc_pc_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://pc:rtc_pc_unittests/" + }, + { + "isolate_name": "rtc_stats_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "rtc_stats_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://stats:rtc_stats_unittests/" + }, + { + "isolate_name": "rtc_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "rtc_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ], + "shards": 6 + }, + "test_id_prefix": "ninja://:rtc_unittests/" + }, + { + "isolate_name": "shared_screencast_stream_test", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "shared_screencast_stream_test", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://modules/desktop_capture:shared_screencast_stream_test/" + }, + { + "isolate_name": "slow_peer_connection_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "slow_peer_connection_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://pc:slow_peer_connection_unittests/" + }, + { + "isolate_name": "svc_tests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "svc_tests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ], + "shards": 4 + }, + "test_id_prefix": "ninja://pc:svc_tests/" + }, + { + "isolate_name": "system_wrappers_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "system_wrappers_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://system_wrappers:system_wrappers_unittests/" + }, + { + "isolate_name": "test_support_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "test_support_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://test:test_support_unittests/" + }, + { + "isolate_name": "tools_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "tools_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://rtc_tools:tools_unittests/" + }, + { + "isolate_name": "video_capture_tests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "video_capture_tests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04", + "pool": "WebRTC-baremetal-try" + } + ] + }, + "test_id_prefix": "ninja://modules/video_capture:video_capture_tests/" + }, + { + "isolate_name": "video_engine_tests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "video_engine_tests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ], + "shards": 4 + }, + "test_id_prefix": "ninja://:video_engine_tests/" + }, + { + "isolate_name": "voip_unittests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "voip_unittests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://:voip_unittests/" + }, + { + "isolate_name": "webrtc_nonparallel_tests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "webrtc_nonparallel_tests", + "resultdb": { + "result_format": "json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://:webrtc_nonparallel_tests/" + }, + { + "args": [ + "--force_fieldtrials=WebRTC-QuickPerfTest/Enabled/", + "--nologs", + "--gtest_output=json:${ISOLATED_OUTDIR}/gtest_output.json" + ], + "isolate_name": "webrtc_perf_tests", + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "webrtc_perf_tests", + "resultdb": { + "result_file": "${ISOLATED_OUTDIR}/gtest_output.json", + "result_format": "gtest_json" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-18.04" + } + ] + }, + "test_id_prefix": "ninja://:webrtc_perf_tests/" + } + ] + }, "linux_dbg": { "isolated_scripts": [ { diff --git a/infra/specs/waterfalls.pyl b/infra/specs/waterfalls.pyl index 6c9214b9d3..ead659c42e 100644 --- a/infra/specs/waterfalls.pyl +++ b/infra/specs/waterfalls.pyl @@ -537,6 +537,17 @@ 'linux_compile_arm_rel': {}, 'linux_compile_dbg': {}, 'linux_compile_rel': {}, + 'linux_coverage': { + 'os_type': + 'linux', + 'mixins': [ + 'linux-bionic', 'x86-64', 'resultdb-json-format', + 'isolate_profile_data' + ], + 'test_suites': { + 'isolated_scripts': 'linux_desktop_tests_tryserver', + }, + }, 'linux_dbg': { 'os_type': 'linux', 'mixins': ['linux-bionic', 'x86-64', 'resultdb-json-format'], diff --git a/tools_webrtc/mb/mb_config.pyl b/tools_webrtc/mb/mb_config.pyl index bdea55aab0..4f7ac2c16e 100644 --- a/tools_webrtc/mb/mb_config.pyl +++ b/tools_webrtc/mb/mb_config.pyl @@ -184,6 +184,7 @@ 'linux_compile_rel': 'pure_release_bot_x64', 'linux_compile_x86_dbg': 'debug_bot_x86', 'linux_compile_x86_rel': 'pure_release_bot_x86', + 'linux_coverage': 'code_coverage_bot_x64', 'linux_dbg': 'debug_bot_x64', 'linux_libfuzzer_rel': 'libfuzzer_asan_release_bot_x64', 'linux_more_configs': { @@ -253,6 +254,8 @@ ['android', 'debug_static_bot', 'arm', 'bwe_test_logging'], 'bwe_test_logging_x64': ['debug_bot', 'x64', 'bwe_test_logging'], 'bwe_test_logging_x86': ['debug_bot', 'x86', 'bwe_test_logging'], + 'code_coverage_bot_x64': + ['openh264', 'release_bot', 'x64', 'code_coverage'], 'codesearch_gen_linux_bot': ['openh264', 'debug_bot', 'minimal_symbols'], 'debug_bot_arm': ['openh264', 'debug_bot', 'arm'], 'debug_bot_arm64': ['openh264', 'debug_bot', 'arm64'], @@ -385,6 +388,9 @@ 'clang': { 'gn_args': 'is_clang=true', }, + 'code_coverage': { + 'gn_args': 'use_clang_coverage=true', + }, 'dcheck_always_on': { 'gn_args': 'dcheck_always_on=true', },