Runs the entire subtest for a given target, invokes [Self::run] for running individual tests.
(
&self,
testfile: &TestFile,
file_update: &mut FileUpdate,
file_path: &'a str,
flags: &'a Flags,
isa: Option<&'a dyn TargetIsa>,
)
| 74 | /// Runs the entire subtest for a given target, invokes [Self::run] for running |
| 75 | /// individual tests. |
| 76 | fn run_target<'a>( |
| 77 | &self, |
| 78 | testfile: &TestFile, |
| 79 | file_update: &mut FileUpdate, |
| 80 | file_path: &'a str, |
| 81 | flags: &'a Flags, |
| 82 | isa: Option<&'a dyn TargetIsa>, |
| 83 | ) -> anyhow::Result<()> { |
| 84 | for (func, details) in &testfile.functions { |
| 85 | info!( |
| 86 | "Test: {}({}) {}", |
| 87 | self.name(), |
| 88 | func.name, |
| 89 | isa.map_or("-", TargetIsa::name) |
| 90 | ); |
| 91 | |
| 92 | let context = Context { |
| 93 | preamble_comments: &testfile.preamble_comments, |
| 94 | details, |
| 95 | flags, |
| 96 | isa, |
| 97 | file_path: file_path.as_ref(), |
| 98 | file_update, |
| 99 | }; |
| 100 | |
| 101 | self.run(Cow::Borrowed(&func), &context) |
| 102 | .context(self.name())?; |
| 103 | } |
| 104 | |
| 105 | Ok(()) |
| 106 | } |
| 107 | |
| 108 | /// Run this test on `func`. |
| 109 | fn run(&self, func: Cow<Function>, context: &Context) -> anyhow::Result<()>; |
nothing calls this directly
no test coverage detected