Unreviewed build fix after r174555.
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Oct 2014 21:58:30 +0000 (21:58 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Oct 2014 21:58:30 +0000 (21:58 +0000)
* public/include/manifest.php:
(ManifestGenerator::generate): Assign an empty array to $repositories_with_commit when there are no commits.
* tests/admin-regenerate-manifest.js: Fixed the test case.

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

Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/include/manifest.php
Websites/perf.webkit.org/tests/admin-regenerate-manifest.js

index b5156b9..9579ece 100644 (file)
@@ -1,3 +1,11 @@
+2014-10-13  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Unreviewed build fix after r174555.
+
+        * public/include/manifest.php:
+        (ManifestGenerator::generate): Assign an empty array to $repositories_with_commit when there are no commits.
+        * tests/admin-regenerate-manifest.js: Fixed the test case.
+
 2014-10-09  Ryosuke Niwa  <rniwa@webkit.org>
 
         New perf dashboard UI tries to fetch commits all the time
index c91cb1d..269b3a8 100644 (file)
@@ -17,7 +17,10 @@ class ManifestGenerator {
         $repositories_table = $this->db->fetch_table('repositories');
 
         $repositories_with_commit = $this->db->query_and_fetch_all(
-            'SELECT DISTINCT(commit_repository) FROM commits WHERE commit_reported IS TRUE') or array();
+            'SELECT DISTINCT(commit_repository) FROM commits WHERE commit_reported IS TRUE');
+        if (!$repositories_with_commit)
+            $repositories_with_commit = array();
+
         foreach ($repositories_with_commit as &$row)
             $row = $row['commit_repository'];
 
index dc09b48..ed5a295 100644 (file)
@@ -45,8 +45,8 @@ describe("/admin/regenerate-manifest", function () {
                             assert.equal(response.statusCode, 200);
                             var manifest = JSON.parse(response.responseText);
                             assert.deepEqual(manifest['repositories'], {
-                                'WebKit': { url: 'trac.webkit.org', blameUrl: null },
-                                'Chromium': { url: null, blameUrl: 'SomeBlameURL' }
+                                'WebKit': { url: 'trac.webkit.org', blameUrl: null, hasReportedCommits: false },
+                                'Chromium': { url: null, blameUrl: 'SomeBlameURL', hasReportedCommits: false }
                             });
                             assert.deepEqual(manifest['bugTrackers']['Bugzilla'], { newBugUrl: null, repositories: ['WebKit'] });
                             assert.deepEqual(manifest['bugTrackers']['Issue Tracker'], { newBugUrl: null, repositories: ['WebKit', 'Chromium'] });