This commit is contained in:
nuno maduro
2026-07-18 02:28:29 +01:00
parent 820fa08313
commit 1ef680c75d
7 changed files with 166 additions and 9 deletions
+7 -2
View File
@@ -562,7 +562,7 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
return $exitCode;
}
$this->snapshotTestResults();
$this->snapshotTestResults(markKnownTestFiles: true);
return $exitCode;
}
@@ -1394,12 +1394,13 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
);
}
$graph->markKnownTestFiles(array_keys($touchedFiles));
$graph->pruneStaleResults($this->branch, array_keys($touchedFiles), array_keys($results));
$collector->reset();
}
private function snapshotTestResults(): void
private function snapshotTestResults(bool $markKnownTestFiles = false): void
{
/** @var ResultCollector $collector */
$collector = Container::getInstance()->get(ResultCollector::class);
@@ -1442,6 +1443,10 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
);
}
if ($markKnownTestFiles) {
$graph->markKnownTestFiles(array_keys($touchedFiles));
}
$graph->pruneStaleResults($this->branch, array_keys($touchedFiles), array_keys($results));
$this->saveGraph($graph);