New flakiness dashboard shouldn't treat tests with right expectations as failing
[WebKit-https.git] / Websites / test-results / public / include / test-results.php
index 77a1c2f833e51e69f877187ded8aca651fce0f6b..77bfc1df0e6e510df6315e610603d9e1c9f4af64 100644 (file)
@@ -137,13 +137,6 @@ abstract class ResultsJSONWriter {
     abstract protected function pass_for_failure_type(&$results);
 }
 
-class FailingResultsJSONWriter extends ResultsJSONWriter {
-    public function __construct($fp) { parent::__construct($fp); }
-    protected function pass_for_failure_type(&$results) {
-        return $results[0]['actual'] == 'PASS';
-    }
-}
-
 class FlakyResultsJSONWriter extends ResultsJSONWriter {
     public function __construct($fp) { parent::__construct($fp); }
     protected function pass_for_failure_type(&$results) {
@@ -175,6 +168,13 @@ class WrongExpectationsResultsJSONWriter extends ResultsJSONWriter {
     }
 }
 
+class FailingResultsJSONWriter extends WrongExpectationsResultsJSONWriter {
+    public function __construct($fp) { parent::__construct($fp); }
+    protected function pass_for_failure_type(&$results) {
+        return $results[0]['actual'] == 'PASS' || parent::pass_for_failure_type($results);
+    }
+}
+
 class ResultsJSONGenerator {
     private $db;
     private $builder_id;