Enable sharding for fuchsia bots.
* Add '--quick' argument to 'low_bandwidth_audio_test' even though it doesn't look like it makes much timing difference. * Add sharding for 'svc_tests' and 'video_engine_tests'. Change-Id: I6e3357954d18ad03ea9f62912dd77e0e1a74b97d Bug: webrtc:14713 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285100 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Jeremy Leconte <jleconte@google.com> Cr-Commit-Position: refs/heads/main@{#38748}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
6358cbf7bb
commit
370ca9c52c
@ -2185,6 +2185,9 @@
|
||||
"test_id_prefix": "ninja://net/dcsctp:dcsctp_unittests/"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"--quick"
|
||||
],
|
||||
"isolate_name": "low_bandwidth_audio_test",
|
||||
"merge": {
|
||||
"args": [],
|
||||
@ -2268,7 +2271,8 @@
|
||||
"cpu": "x86-64",
|
||||
"os": "Ubuntu-18.04"
|
||||
}
|
||||
]
|
||||
],
|
||||
"shards": 4
|
||||
},
|
||||
"test_id_prefix": "ninja://pc:svc_tests/"
|
||||
},
|
||||
@ -2312,7 +2316,8 @@
|
||||
"cpu": "x86-64",
|
||||
"os": "Ubuntu-18.04"
|
||||
}
|
||||
]
|
||||
],
|
||||
"shards": 4
|
||||
},
|
||||
"test_id_prefix": "ninja://:video_engine_tests/"
|
||||
},
|
||||
|
||||
@ -121,17 +121,23 @@
|
||||
'common_audio_unittests': {},
|
||||
'common_video_unittests': {},
|
||||
'dcsctp_unittests': {},
|
||||
'low_bandwidth_audio_test': {},
|
||||
'low_bandwidth_audio_test': {
|
||||
'args': ['--quick']
|
||||
},
|
||||
'rtc_media_unittests': {},
|
||||
# TODO(bugs.webrtc.org/14705): Enable when NonGlobalFieldTrialsInstanceDoesNotModifyGlobalString is fixed.
|
||||
# TODO(bugs.webrtc.org/14700): Enable when NetworkTest tests are fixed.
|
||||
# 'rtc_unittests': {},
|
||||
'rtc_pc_unittests': {},
|
||||
'svc_tests': {},
|
||||
'svc_tests': {
|
||||
'mixins': ['shards-4'],
|
||||
},
|
||||
'system_wrappers_unittests': {},
|
||||
# TODO(bugs.webrtc.org/14712): Enable once network issue is fixed.
|
||||
# 'peerconnection_unittests': {},
|
||||
'video_engine_tests': {},
|
||||
'video_engine_tests': {
|
||||
'mixins': ['shards-4'],
|
||||
},
|
||||
'voip_unittests': {},
|
||||
# TODO(bugs.fuchsia.dev/115601): Enable when cpu time API's are implemented in Fuchsia
|
||||
# 'test_support_unittests': {},
|
||||
|
||||
@ -2296,6 +2296,9 @@
|
||||
"test_id_prefix": "ninja://net/dcsctp:dcsctp_unittests/"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"--quick"
|
||||
],
|
||||
"isolate_name": "low_bandwidth_audio_test",
|
||||
"merge": {
|
||||
"args": [],
|
||||
@ -2379,7 +2382,8 @@
|
||||
"cpu": "x86-64",
|
||||
"os": "Ubuntu-18.04"
|
||||
}
|
||||
]
|
||||
],
|
||||
"shards": 4
|
||||
},
|
||||
"test_id_prefix": "ninja://pc:svc_tests/"
|
||||
},
|
||||
@ -2423,7 +2427,8 @@
|
||||
"cpu": "x86-64",
|
||||
"os": "Ubuntu-18.04"
|
||||
}
|
||||
]
|
||||
],
|
||||
"shards": 4
|
||||
},
|
||||
"test_id_prefix": "ninja://:video_engine_tests/"
|
||||
},
|
||||
|
||||
@ -100,6 +100,17 @@ ABSL_FLAG(std::string,
|
||||
"Path to collect trace events (json file) for chrome://tracing. "
|
||||
"If not set, events aren't captured.");
|
||||
|
||||
ABSL_FLAG(std::string,
|
||||
test_launcher_shard_index,
|
||||
"",
|
||||
"Index of the test shard to run, from 0 to "
|
||||
"the value specified with --test_launcher_total_shards.");
|
||||
|
||||
ABSL_FLAG(std::string,
|
||||
test_launcher_total_shards,
|
||||
"",
|
||||
"Total number of shards.");
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
namespace {
|
||||
@ -127,6 +138,19 @@ class TestMainImpl : public TestMain {
|
||||
rtc::LogMessage::SetLogToStderr(absl::GetFlag(FLAGS_logs) ||
|
||||
absl::GetFlag(FLAGS_verbose));
|
||||
|
||||
// The sharding arguments take precedence over the sharding environment
|
||||
// variables.
|
||||
if (!absl::GetFlag(FLAGS_test_launcher_shard_index).empty() &&
|
||||
!absl::GetFlag(FLAGS_test_launcher_total_shards).empty()) {
|
||||
std::string shard_index =
|
||||
"GTEST_SHARD_INDEX=" + absl::GetFlag(FLAGS_test_launcher_shard_index);
|
||||
std::string total_shards =
|
||||
"GTEST_TOTAL_SHARDS=" +
|
||||
absl::GetFlag(FLAGS_test_launcher_total_shards);
|
||||
putenv(shard_index.data());
|
||||
putenv(total_shards.data());
|
||||
}
|
||||
|
||||
// InitFieldTrialsFromString stores the char*, so the char array must
|
||||
// outlive the application.
|
||||
field_trials_ = absl::GetFlag(FLAGS_force_fieldtrials);
|
||||
|
||||
Reference in New Issue
Block a user