Build fixes. In particular, we were missing the code to generate JSONs in report...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Nov 2013 20:15:08 +0000 (20:15 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Nov 2013 20:15:08 +0000 (20:15 +0000)
* public/api/report.php:
* public/include/test-results.php:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158585 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/test-results/ChangeLog
Websites/test-results/public/api/report.php
Websites/test-results/public/include/test-results.php

index 1fe0c6f..7d018ee 100644 (file)
@@ -1,5 +1,12 @@
 2013-11-04  Ryosuke Niwa  <rniwa@webkit.org>
 
+        Build fixes. In particular, we were missing the code to generate JSONs in report.php :(
+
+        * public/api/report.php:
+        * public/include/test-results.php:
+
+2013-11-04  Ryosuke Niwa  <rniwa@webkit.org>
+
         Fix JSON generations on new flakiness dashboard
         https://bugs.webkit.org/show_bug.cgi?id=123723
 
index 211c9d2..c52daa2 100644 (file)
@@ -34,7 +34,7 @@ function store_results($db, $master, $builder_name, $build_number, $start_time,
     if (!store_test_results($db, $test_results, $build_id, $start_time, $end_time, $slave_id))
         exit_with_error('FailedToStoreResults', array('buildId' => $build_id));
 
-    return $build_id;
+    return array('build_id' => $build_id, 'builder_id' => $builder_id);
 }
 
 function main() {
@@ -66,7 +66,7 @@ function main() {
     $json_path = $_FILES['file']['tmp_name'];
 
     $db = connect();
-    $build_id = store_results($db, $master, $builder_name, $build_number, $start_time, $end_time, $revisions, $json_path);
+    $builder_and_build = store_results($db, $master, $builder_name, $build_number, $start_time, $end_time, $revisions, $json_path);
     @ob_end_clean();
     ignore_user_abort();
     ob_start();
@@ -81,7 +81,11 @@ function main() {
     if (function_exists('fastcgi_finish_request'))
         fastcgi_finish_request();
 
-    update_flakiness_after_inserting_build($build_id);
+    update_flakiness_after_inserting_build($db, $builder_and_build['build_id']);
+
+    $generator = new ResultsJSONGenerator($db, $builder_and_build['builder_id']);
+    $generator->generate('wrongexpectations');
+    $generator->generate('flaky');
 }
 
 main();
index 5d71f20..a718c71 100644 (file)
@@ -171,7 +171,7 @@ class ResultsJSONGenerator {
         }
 
         if (!$test_rows)
-            return FALSE;
+            return TRUE;
 
         $comma_separated_test_ids = '';
         foreach ($test_rows as $row) {