Macro fork_test

Source
macro_rules! fork_test {
    ($(
         $(#[$meta:meta])*
         fn $test_name:ident() $( -> $test_return:ty )? $body:block
    )*) => { ... };
}
Expand description

Run Rust tests in subprocesses.

The basic usage is to simply put this macro around your #[test] functions.

use test_fork_core::fork_test;

fork_test! {
    #[test]
    fn my_test() {
        assert_eq!(2, 1 + 1);
    }

    // more tests...
}

Each test will be run in its own process. If the subprocess exits unsuccessfully for any reason, including due to signals, the test fails.