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 1fe0c6f60b14ff2c91021a274cc9e52df3b91ca0..7d018ee97051146b5b2f0953c62d58df86f5dc55 100644 (file)
@@ -1,3 +1,10 @@
+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
index 211c9d288574ffbb7ff20ec117185966ca758125..c52daa29418057e373c35b080da1b305deb9bcd1 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 5d71f20460c097ec9e2169a37c31ec81397c64cc..a718c713d2cff763d0f90bdd17f999cf654bb954 100644 (file)
@@ -171,7 +171,7 @@ class ResultsJSONGenerator {
         }
 
         if (!$test_rows)
-            return FALSE;
+            return TRUE;
 
         $comma_separated_test_ids = '';
         foreach ($test_rows as $row) {