Description
This is a continuation of a break-out discussion from #26062 (comment)
Relevant parts of the discussion:
I noticed cgroups now also enforce test group sizes; that was surprising to me. I kind of wanted to turn off or change the sizes as we transition to cgroups (so many of our "small" tests exceed the memory limit but could not find an easy way).
I want to still support cgroup limits but just not the test size resource limits.
-
getLocalResourceUsage
includes defaults for test sizes https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/analysis/test/TestTargetProperties.java#L206 -
this information is passed into the
Spawn
via https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java#L131 -
If the mnemonic is set, then the
LinuxSandboxSpawnRunner
uses the local resource usage https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedSpawnRunner.java#L317
I wanted to support the tags
like resources:memory:20
but enabling this also enables the enforcement of the test sizes as per the previous bullet points.