parse the custom library config
(&self)
| 155 | |
| 156 | /// parse the custom library config |
| 157 | fn parse_lib_config(&self) -> Result<LibConfig> { |
| 158 | let data = self.get_library_data_dir()?; |
| 159 | let config_path: PathBuf = [data, "config.yaml".into()].iter().collect(); |
| 160 | let content = std::fs::read_to_string(config_path)?; |
| 161 | let config: LibConfig = serde_yaml::from_str(&content) |
| 162 | .context("fail to parse yaml config file, please check your syntax")?; |
| 163 | Ok(config) |
| 164 | } |
| 165 | |
| 166 | /// get the data directory of the library under test. |
| 167 | pub fn get_library_data_dir(&self) -> Result<PathBuf> { |
no test coverage detected