/// Reads test specs from a buck test run description at the given path.
Reads test specs from a buck test run description at the given path.
Reads test specs from a buck test run description at the given path .
pub fn read<P: AsRef<Path>>(path: P) -> Result<Vec<TestSpec>> {
    let path = path.as_ref();
    let file = File::open(path)
        .with_context(|| format!("Failed to read test specs from {}", path.display()))?;
    let specs: Vec<TestSpec> = serde_json::from_reader(BufReader::new(file))
        .with_context(|| format!("Failed to parse JSON spec from {}", path.display()))?;
    return Ok(specs);
}
pub fn read < P : AsRef < Path > > ( path : P ) -> Result < Vec < TestSpec > > { let path = path . as_ref ( ) ; let file = File :: open ( path ) . with_context ( | | format ! ( " " path display ( ) ) ) ? ; let specs : Vec < TestSpec > = serde_json :: from_reader ( BufReader :: new ( file ) ) . with_context ( | | format ! ( " " path display ( ) ) ) ? ; return Ok ( specs ) ; }
Reads test specs from a buck test run description at the given path.
Reads test specs from a buck test run description at the given path .
path
P