Skip to content

tests: size, shard, poll and dedupe for faster test runs - #14835

Open
TrapsterDK wants to merge 1 commit into
mainfrom
plan-test-speedups
Open

TrapsterDK wants to merge 1 commit into
mainfrom
plan-test-speedups

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Five test speedups from #14776.

  • testing: default size small for cc_toolchain_test and deploy_verify_test #14787 Every cc_toolchain_test and deploy_verify_test call site now sets size = "small". Starlark test rules can't change the implicit size default, so the size goes on each call site. Lowered no-size counts in tools/ci/test_budget_allowlist.txt: cc/tests 39→7, cuda/tests 28→22, deploy/private 110→83, plus the cgo, python, qt, native_call and hermetic compiler packages.
  • testing: shard the large unit crates #14788 (partial) //cli/adopt:dx_adopt_test gets shard_count = 2: 4.0s → slowest shard 2.7s. Measured locally, the others don't gain from sharding. adapter takes 0.55s and runner 0.5s, so shard setup costs more than it saves. cli/plan takes 2.4s and gained nothing. Sharding deploy/private:deploy_tools (7.1s) exposes a PATH race: with_env changes PATH while other tests spawn processes. That needs a separate fix.
  • testing: replace fixed sleeps with short polls #14789 deploy_smoke_test.rs now polls until a 30s deadline instead of sleeping between attempts. maven_pin.rs was already fixed on main in tests: wait on events instead of fixed sleeps in the test harness #14818. sleep_budget.txt: 16 → 15 sleeps.
  • julia: delete the duplicate hello_standalone_output_test #14790 Deleted hello_standalone_output_test. relocate_test already asserts "Hello, julia!" from the same binary. Also removed from the ci.yml launch lists.
  • testing: stop rebuilding toolchains in tests #14791 (partial) aarch64_builtins now targets //appimage:linux_arm64 instead of @llvm//platforms:linux_aarch64. The stage0 runtimes now share one configuration with the other arm64 cross tests: cross_archive_test reused the builtins archive instead of rebuilding it. For cc/private/toolchain/select.bzl:89 I found no rebuild. The transition only sets what each test asks for, and //cc:compiler is kept out of the exec config.

The PR also fixes a build break on main from #14822: drop() on a Copy send result fails dropping_copy_types in cli/plan/src/slots_tests.rs, cli/cli/src/test_support.rs and cli/cli/src/exec/error_boundary_launcher_tests.rs.

Linux: test_budget_test, sleep_budget_test, dx_plan_test, dx_adopt_test, dx_cli_test, deploy_smoke_test, relocate_test, lse_atomic_sources_test, cross_archive_test and sampled cc/deploy verify tests all pass.

Closes #14787
Closes #14789
Closes #14790
Part of #14788
Part of #14791

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus

- cc_toolchain_test and deploy_verify_test call sites set size small;
  test budget no-size counts shrink to match.
- dx_adopt_test runs in 2 shards.
- deploy_smoke_test polls until a deadline instead of sleeping between
  attempts; sleep budget drops by one.
- Delete hello_standalone_output_test; relocate_test checks the same
  output from the same binary.
- aarch64 builtins test builds for //appimage:linux_arm64 so it shares
  the runtimes built for the other arm64 cross tests.
- Fix drop() on Copy send results in cli and plan tests, which broke
  the build under dropping_copy_types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus
@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

/evidence platforms=["macos_arm64","windows_x86_64"] task=test scope=//cli/adopt:all //cli/plan:all //cli/cli:dx_cli_test //cc/tests:all //deploy/private:all //julia/tests/fixtures/hello:all //tools/ci:all //patches/llvm/tests:all //tools/docs/site:all

@github-actions

Copy link
Copy Markdown
Contributor

Evidence started on plan-test-speedups: https://github.com/devhusdk/rules_dx/actions/runs/45398089529

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant