Commit Graph

7 Commits

Author SHA1 Message Date
Tyler Cloutier 42f679e612 Add remote server support to Rust smoketests
Enable running Rust smoketests against a remote server instead of
spawning local servers, similar to Python smoketests --remote-server.

- Add SPACETIME_REMOTE_SERVER env var support to skip local server spawn
- Add --server CLI option to cargo smoketest
- Add skip_if_remote!() macro for tests requiring local server control
- Mark restart tests with skip_if_remote!() since they need local server
2026-01-26 23:27:18 -05:00
Tyler Cloutier 9b47a1b554 Fix lint 2026-01-26 12:35:33 -05:00
Tyler Cloutier db95efd38c Ran cargo fmt 2026-01-25 21:27:37 -05:00
= 4ad3112716 Switch smoketests to release mode and remove redundant warmup
- Build CLI/standalone in release mode for faster test execution
- Run tests in release mode (faster SpacetimeDB server)
- Remove redundant WASM cache warmup (precompiled modules already warm it)
- Increase default parallelism to 16 (optimal based on benchmarks)

This reduces fresh build time by ~16 seconds and test execution
time by ~5x compared to debug mode.
2026-01-25 21:17:03 -05:00
= 5a8107f633 Add precompiled WASM modules for smoketests
Extract static smoketest modules into a nested workspace at
crates/smoketests/modules/ that is pre-compiled during warmup.
This eliminates per-test WASM compilation overhead.

Key changes:
- Add 38 precompiled module crates in nested workspace
- Add module registry (src/modules.rs) for WASM path lookup
- Add precompiled_module() builder and use_precompiled_module() method
- Update xtask warmup to build nested workspace
- Migrate all static tests to use precompiled modules
- Tests using precompiled modules run in ~0.5-3s vs ~4-7s before

Tests that need runtime compilation (auto_migration, detect_wasm_bindgen,
intentionally-broken modules) continue to use module_code().
2026-01-25 21:17:03 -05:00
= 4e7fee21e7 Add WASM cache warmup and optimize parallel smoketest execution
- Add warmup_wasm_cache() to pre-compile dependencies before tests run
- Use shared target directory for all tests to reuse compiled deps
- Limit parallelism to 8 jobs to reduce cargo lock contention
- Add --no-fail-fast to run all tests even if some fail

Results: 329s total (vs 378s before), 13 slow tests (vs 35 before)
2026-01-25 21:17:03 -05:00
= 87f318c4bc Add shared target directory for faster parallel smoketests
- Rename tools/xtask to tools/xtask-smoketest
- Add USE_SHARED_TARGET_DIR flag to control caching behavior
- When true: tests share target/smoketest-modules/ and global CARGO_HOME
- When false: each test gets isolated CARGO_HOME (no sharing)
- Shared mode is 1.68x faster (378s vs 636s for all tests)
- Add detailed build timing instrumentation
2026-01-25 21:17:03 -05:00