mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-08 23:08:19 -05:00
chore: Iterate each test case in ef-tests in parallel (#15368)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
//! Test case definitions
|
||||
|
||||
use crate::result::{CaseResult, Error};
|
||||
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
|
||||
use std::{
|
||||
fmt::Debug,
|
||||
path::{Path, PathBuf},
|
||||
@@ -34,6 +35,9 @@ pub struct Cases<T> {
|
||||
impl<T: Case> Cases<T> {
|
||||
/// Run the contained test cases.
|
||||
pub fn run(&self) -> Vec<CaseResult> {
|
||||
self.test_cases.iter().map(|(path, case)| CaseResult::new(path, case, case.run())).collect()
|
||||
self.test_cases
|
||||
.par_iter()
|
||||
.map(|(path, case)| CaseResult::new(path, case, case.run()))
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user