From 2e68659ef69cdb1db246eceb30e5eb26e2989c2e Mon Sep 17 00:00:00 2001 From: "rniwa@webkit.org" Date: Sat, 26 Oct 2013 06:13:37 +0000 Subject: [PATCH] Build fix. The query results weren't sorted by the latest commit time, yielding wrong set of tests to be listed in the builder pane. * public/include/test-results.php: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158080 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Websites/test-results/ChangeLog | 7 +++++++ Websites/test-results/public/include/test-results.php | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Websites/test-results/ChangeLog b/Websites/test-results/ChangeLog index afaf21d..3b23d75 100644 --- a/Websites/test-results/ChangeLog +++ b/Websites/test-results/ChangeLog @@ -1,5 +1,12 @@ 2013-10-25 Ryosuke Niwa + Build fix. The query results weren't sorted by the latest commit time, + yielding wrong set of tests to be listed in the builder pane. + + * public/include/test-results.php: + +2013-10-25 Ryosuke Niwa + Links in new flakiness dashboard could benefit from tooltips https://bugs.webkit.org/show_bug.cgi?id=123381 diff --git a/Websites/test-results/public/include/test-results.php b/Websites/test-results/public/include/test-results.php index 1634217..77a1c2f 100644 --- a/Websites/test-results/public/include/test-results.php +++ b/Websites/test-results/public/include/test-results.php @@ -197,12 +197,12 @@ class ResultsJSONGenerator { $number_of_days = self::MAXIMUM_NUMBER_OF_DAYS; $all_results = $this->db->query( "SELECT results.*, builds.* FROM results - JOIN (SELECT builds.*, array_agg((build_revisions.repository, build_revisions.value, build_revisions.time)) AS revisions + JOIN (SELECT builds.*, array_agg((build_revisions.repository, build_revisions.value, build_revisions.time)) AS revisions, + max(build_revisions.time) AS latest_revision_time FROM builds, build_revisions WHERE build_revisions.build = builds.id AND builds.builder = $1 AND builds.start_time > now() - interval '$number_of_days days' - GROUP BY builds.id - ORDER BY max(build_revisions.time) DESC) as builds ON results.build = builds.id - ORDER BY results.test", array($this->builder_id)); + GROUP BY builds.id) as builds ON results.build = builds.id + ORDER BY results.test, latest_revision_time DESC", array($this->builder_id)); if (!$all_results) return FALSE; -- 1.8.3.1