mirror of https://github.com/mongodb/mongo
SERVER-112888 Increase memory on TSAN unit tests (#43102)
GitOrigin-RevId: 4084b67c756a3446ad0d5febadfc1274030b31d8
This commit is contained in:
parent
68b6af1381
commit
e9af7ea025
|
|
@ -1641,6 +1641,26 @@ config_setting(
|
|||
},
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "tsan_enabled_x86_64",
|
||||
constraint_values = [
|
||||
"@platforms//cpu:x86_64",
|
||||
],
|
||||
flag_values = {
|
||||
"//bazel/config:tsan": "True",
|
||||
},
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "tsan_enabled_arm64",
|
||||
constraint_values = [
|
||||
"@platforms//cpu:aarch64",
|
||||
],
|
||||
flag_values = {
|
||||
"//bazel/config:tsan": "True",
|
||||
},
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "sanitize_address_required_settings",
|
||||
match_all = [
|
||||
|
|
|
|||
|
|
@ -1099,19 +1099,35 @@ def mongo_cc_test(
|
|||
minimum_test_resources: a dict of key/value pairs defining execution
|
||||
requirements for the test. The only currently supported key is "cpu_cores".
|
||||
"""
|
||||
minimum_core_count = 1
|
||||
if "cpu_cores" in minimum_test_resources:
|
||||
if minimum_test_resources["cpu_cores"] == 2:
|
||||
exec_properties = exec_properties | select({
|
||||
"@platforms//cpu:x86_64": {
|
||||
"test.Pool": "large_mem_2core_x86_64",
|
||||
},
|
||||
"@platforms//cpu:aarch64": {
|
||||
"test.Pool": "large_memory_2core_arm64",
|
||||
},
|
||||
"//conditions:default": {},
|
||||
})
|
||||
elif minimum_test_resources["cpu_cores"] > 2:
|
||||
fail("minimum_test_resources[\"cpu_cores\"] > 2 is not supported")
|
||||
minimum_core_count = minimum_test_resources["cpu_cores"]
|
||||
|
||||
if minimum_core_count == 2:
|
||||
exec_properties = exec_properties | select({
|
||||
"@platforms//cpu:x86_64": {
|
||||
"test.Pool": "large_mem_2core_x86_64",
|
||||
},
|
||||
"@platforms//cpu:aarch64": {
|
||||
"test.Pool": "large_memory_2core_arm64",
|
||||
},
|
||||
"//conditions:default": {},
|
||||
})
|
||||
elif minimum_core_count > 2:
|
||||
fail("minimum_test_resources[\"cpu_cores\"] > 2 is not supported")
|
||||
else:
|
||||
# TSAN will use more memory and EngFlow currently does not surface a good
|
||||
# error message to users when an OOM occurs.
|
||||
# TOOD(SERVER-112889): Remove this once OOM errors are better surfaced by EngFlow
|
||||
exec_properties = exec_properties | select({
|
||||
"//bazel/config:tsan_enabled_x86_64": {
|
||||
"test.Pool": "large_mem_x86_64",
|
||||
},
|
||||
"//bazel/config:tsan_enabled_arm64": {
|
||||
"test.Pool": "large_memory_arm64",
|
||||
},
|
||||
"//conditions:default": {},
|
||||
})
|
||||
|
||||
_mongo_cc_binary_and_test(
|
||||
name,
|
||||
|
|
|
|||
Loading…
Reference in New Issue