Skip to content

Commit 285bf67

Browse files
Reduce the number of gtest-parallel workers when running Impeller tests on Mac Minis used by CI (#189813)
#188889 started using the Impeller rendering backends in playground tests run by the impeller_unittests harness. Since then, runs of OpenGLESSDF tests on macOS CI have been flaky. These flakes show up as gtest-parallel child processes that fail with exit code -5 (SIGTRAP). The affected CI machines are M1 Mac Minis (hardware model "Macmini9,1") This is an experiment to see if limiting the number of test cases run in parallel on these machines reduces the crashes. See #189748
1 parent 3a5c2ce commit 285bf67

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎engine/src/flutter/testing/run_tests.py‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ def is_aarm64() -> bool:
164164
return aarm64
165165

166166

167+
def mac_hardware_model() -> str:
168+
assert is_mac()
169+
output = subprocess.check_output(['sysctl', '-n', 'hw.model'])
170+
return output.decode('utf-8').strip()
171+
172+
167173
def is_linux() -> bool:
168174
return sys_platform.startswith('linux')
169175

@@ -568,7 +574,13 @@ def make_test(
568574
)
569575
extra_env = metal_validation_env()
570576
extra_env.update(vulkan_validation_env(build_dir))
571-
mac_impeller_unittests_flags = repeat_flags + [
577+
if mac_hardware_model() == 'Macmini9,1':
578+
# For the Mac Minis used on CI, limit the number of Impeller test cases run in parallel
579+
# in order to reduce the risk of resource exhaustion errors.
580+
workers_flag = ['--workers=%d' % (os.cpu_count() - 2)]
581+
else:
582+
workers_flag = []
583+
mac_impeller_unittests_flags = repeat_flags + workers_flag + [
572584
'--gtest_filter=-*OpenGLES', # These are covered in the golden tests.
573585
'--',
574586
'--enable_vulkan_validation',

0 commit comments

Comments
 (0)