rust_tracy_client icon indicating copy to clipboard operation
rust_tracy_client copied to clipboard

Reimplement the test suite to use `nextest` and the `capture` binary from tracy

Open nagisa opened this issue 11 months ago • 1 comments

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-nextest to isolate each test run into a separate process, thus solving "global tracy context" problem;
  • Have each test handle spawning a capture utility 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 :)

nagisa avatar Dec 07 '24 23:12 nagisa

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.)

nagisa avatar Dec 07 '24 23:12 nagisa