pub struct TestConfig {
pub program: String,
pub args: Vec<String>,
pub workspace: PathBuf,
pub timeout: Duration,
pub retries: u8,
}Expand description
A test command to run.
Fields§
§program: StringThe program to run.
args: Vec<String>Its arguments.
workspace: PathBufThe directory to run in.
timeout: DurationHow long a single attempt may run before it is killed.
retries: u8How many further attempts to make after a failing one.
Zero by default. See the module documentation: these detect flakiness, they do not excuse it.
Implementations§
Source§impl TestConfig
impl TestConfig
Sourcepub fn new(
program: impl Into<String>,
args: impl IntoIterator<Item = impl Into<String>>,
workspace: impl Into<PathBuf>,
) -> Self
pub fn new( program: impl Into<String>, args: impl IntoIterator<Item = impl Into<String>>, workspace: impl Into<PathBuf>, ) -> Self
A test command, with the default timeout and no retries.
Sourcepub fn retrying(self, retries: u8) -> Self
pub fn retrying(self, retries: u8) -> Self
Re-run a failing suite up to retries more times, to find out whether
it is broken or merely unreliable.
Trait Implementations§
Source§impl Clone for TestConfig
impl Clone for TestConfig
Source§impl Debug for TestConfig
impl Debug for TestConfig
impl Eq for TestConfig
Source§impl PartialEq for TestConfig
impl PartialEq for TestConfig
impl StructuralPartialEq for TestConfig
Auto Trait Implementations§
impl Freeze for TestConfig
impl RefUnwindSafe for TestConfig
impl Send for TestConfig
impl Sync for TestConfig
impl Unpin for TestConfig
impl UnsafeUnpin for TestConfig
impl UnwindSafe for TestConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more