rust_doctest_common/
lib.rs

1//! Some shared code for the doctest stuff.
2
3use camino::Utf8PathBuf;
4
5/// A binary that has a test harness that is like libtest
6#[derive(Debug, serde_derive::Deserialize, serde_derive::Serialize)]
7#[serde(deny_unknown_fields)]
8pub struct TestBinary {
9    /// The name of this binary.
10    pub name: String,
11    /// Relative path to the binary relative to the rust_doctest_builder output directory.
12    pub path: Utf8PathBuf,
13}
14
15/// A manifest created by the rust_doctest_builder, used
16/// by the rust_doctest_runner.
17#[derive(Debug, serde_derive::Deserialize, serde_derive::Serialize)]
18#[serde(deny_unknown_fields)]
19pub struct Manifest {
20    /// A list of binaries created.
21    pub test_binaries: Vec<TestBinary>,
22    /// Some tests are standalone binaries these are found via ENV vars.
23    /// These paths are all relative to the rust_doctest_builder output directory.
24    pub standalone_binary_envs: Vec<(String, Utf8PathBuf)>,
25}