mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-30 20:35:01 +01:00
These tests typically take 10-20s, but I'm seeing some timeouts [here](https://github.com/carbon-language/carbon-lang/actions/runs/11899548036/job/33158400417). This seemed particularly suspicious due to the _absence_ of output (copied below). That got me looking, and maybe the subprocessing tickles a cpu bottleneck, so proposing this approach to remove the exec. Even if this doesn't solve the flakiness, I think it's a simpler implementation. Note I believe this is intended to work. The `sh` rules rely on shebangs (as noted at https://bazel.build/reference/be/shell#sh_test), and are essentially just subprocessing to the input. Note this could've also had `args` on a `cc_test` rule, but I'd expect the same args to be passed to `run` where instead the benchmark behavior should be default (and I'm assuming you'd rather not have args there). Fundamentally this becomes a symlink: ``` bazel-bin/common/map_benchmark_test -> .../execroot/_main/bazel-out/k8-fastbuild/bin/common/map_benchmark ``` Copying snippet from timeout below: ``` ==================== Test output for //common:map_benchmark_test: /private/var/tmp/_bazel_runner/e591f63ed099023de1f206992dfce127/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/common/map_benchmark_test/test.log -- Test timed out at 2024-11-18 19:32:13 UTC -- INFO: From Testing //common:map_benchmark_test: ================================================================================ ```