Skip to main content

affected_tests

Function affected_tests 

Source
pub fn affected_tests(root: &Path, run: &StoredRun) -> Result<Value, String>
Expand description

Which of a run’s tests the current checkout’s changes could have reached, from what each test executed and what has changed since, declaration by declaration. A test is affected by a change in code it ran, in its test file, or in a file it ran code in whose declarations changed shape; not by a change confined to code it never ran; not by comments or blank lines. A test that did not pass is listed as affected regardless: it has a result to establish. What this cannot see is a file the run never captured – a file added since – and the run’s dependencies and configuration, which the working-tree check answers for.