rust_tracy_client
rust_tracy_client copied to clipboard
Reimplement the test suite to use `nextest` and the `capture` binary from tracy
The current test suite is pretty poor in that it expects the user to bring up a tracy capture session by themselves, and is not really automatic in any way. Furthermore the threaded test runner just fights over the global tracy instance.
Tests cannot really run in parallel or anything like that for those reasons.
A better option would be to:
- Use
cargo-nextestto isolate each test run into a separate process, thus solving "global tracy context" problem; - Have each test handle spawning a
captureutility from the upstream tracy project, thus recording the traces properly; - Implement checks for things we expect to find in the profiles (rather than expecting users to load those profiles into tracy and know what to look for.) Though for the most part our current tests are of "running this sort of valid looking code no longer crashes the process" variety, which don't really require any checks :)
Note that for examples crate it still makes a lot of sense to me to have users to invoke whatever tracy profile ingesters they wish to use with the example (whether it is the GUI interface, or the capture utility.)