mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
fix fml_unittes is not run during presubmit (flutter/engine#13395)
This commit is contained in:
parent
46a09c2bd6
commit
e92c42f0aa
@ -192,17 +192,19 @@ TEST(MessageLoopTaskQueue, ConcurrentQueueAndTaskCreatingCounts) {
|
||||
auto creation_func = [&] {
|
||||
for (int i = 0; i < num_queues; i++) {
|
||||
fml::TaskQueueId queue_id = task_queues->CreateTaskQueue();
|
||||
created[queue_id - base_queue_id] = true;
|
||||
int limit = queue_id - base_queue_id;
|
||||
created[limit] = true;
|
||||
|
||||
for (int cur_q = 1; cur_q < i; cur_q++) {
|
||||
if (created[cur_q - base_queue_id]) {
|
||||
std::scoped_lock counter(task_count_mutex[cur_q - base_queue_id]);
|
||||
for (int cur_q = 1; cur_q < limit; cur_q++) {
|
||||
if (created[cur_q]) {
|
||||
std::scoped_lock counter(task_count_mutex[cur_q]);
|
||||
int cur_num_tasks = rand() % 10;
|
||||
for (int k = 0; k < cur_num_tasks; k++) {
|
||||
task_queues->RegisterTask(
|
||||
fml::TaskQueueId(cur_q), [] {}, fml::TimePoint::Now());
|
||||
fml::TaskQueueId(base_queue_id + cur_q), [] {},
|
||||
fml::TimePoint::Now());
|
||||
}
|
||||
num_tasks[cur_q - base_queue_id] += cur_num_tasks;
|
||||
num_tasks[cur_q] += cur_num_tasks;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ fonts_dir = os.path.join(buildroot_dir, 'flutter', 'third_party', 'txt', 'third_
|
||||
roboto_font_path = os.path.join(fonts_dir, 'Roboto-Regular.ttf')
|
||||
dart_tests_dir = os.path.join(buildroot_dir, 'flutter', 'testing', 'dart',)
|
||||
|
||||
time_sensitve_test_flag = '--gtest_filter="-*TimeSensitiveTest*"'
|
||||
time_sensitve_test_flag = '--gtest_filter=-*TimeSensitiveTest*'
|
||||
|
||||
def IsMac():
|
||||
return sys.platform == 'darwin'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user