~/talk

Creating a custom test harness for advanced test setups

Talkat Oxidize 2025 · 2025-09-16..09-18· [rust, testing]
links:none on file
links:none on file
slides:none on file

Explains how to opt out of Cargo’s automatic harness, replace the runner with libtest-mimic, and solve compile-time discovery using linkme; introduces the satchel crate that provides test/bench macros and produces distributed slices so tests register without manual listing. Shows exporting an extern "C" main so CMake/CTest can drive tests, using Corrosion to import crates, and notes practical limits like suppressed stdout capture and using a feature gate instead of cfg(test).

AI-written summary · about

  1. 0:00Custom test harnesses intro
  2. 1:05Why replace default harness
  3. 2:27Default test pipeline
  4. 4:36Opting out of harness
  5. 7:28Satchel crate for discovery
  6. 11:27Rust tests with CMake
  7. 15:03Key takeaways
  8. 16:53Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.