BabelStream/rust-stream/tests/integration_test.rs
Tom Lin c61b93dc65 Add unsafe and Arc implementation
Add BABELSTREAM_NUM_THREADS env option
Refactor driver
Bump dependencies
2021-12-06 15:55:52 +00:00

18 lines
634 B
Rust

use rstest::rstest;
#[rstest]
fn test_main(
#[values(0, 1, 2, 3, 4)] device: usize, //
#[values("", "--pin")] pin: &str, //
#[values("", "--malloc")] malloc: &str, //
#[values("", "--init")] init: &str, //
#[values("", "--triad-only", "--nstream-only")] option: &str, //
) {
let line = format!(
"rust-stream --arraysize 2048 --device {} {} {} {} {}",
device, pin, malloc, init, option
);
let args = line.split_whitespace().map(|s| s.to_string()).collect::<Vec<_>>();
assert!(rust_stream::run(&args));
}